HOME FORUMS BROKERS SOFTWARE BOOKS CONTACT US
Elite Trader Your Account  •  Become a Member  •  Help  •  Search    
    Forums ›› Technically Speaking ›› Programming ›› Ib Java Api Update Order Prob  


Post A Reply
    
Nab
 

Registered: Sep 2012
Posts: 43

 

09-17-12 07:42 AM

Hey,

I have the following problem with the IB JAVA API (with IB GW), hopefully someone can help :

Updating STPLMT orders after submission via placeOrder with new LMT price works fine. However, after reseting the API connection, and re-importing the order data via reqOpenOrders, a placeOrder with the returned order data + new LMT fails with the error code

297 | 321 | Error validating request:-'ic' : cause - Cannot set VOL attribute on non-VOL order.

Which seems a bit strange ... is this problem known?
(the order data reqOpenOrders returns appears to me a bit inconsistent, at least it returns for m_orderType="STP LMT" instead of "STPLMT", but that alone does not solve the prob ...)

Thx
Nab

    Edit/Delete Quote Complain
2rosy
 

Registered: May 2012
Posts: 336

 

09-17-12 02:29 PM

its probably your code. without that no one can help

    Edit/Delete Quote Complain
mickmak
 

Registered: Jan 2010
Posts: 99

 

09-17-12 09:17 PM

first question - why do you need to repeat the same order action? If your API connection is disconnected and you reconnect at a later time, (as long as your order time enforcement is OK) you should get all of your open orders back. No need to send those orders back in.

I haven't used IB Java API, but potentially you maybe trying to update the order before allowing the GW to register the order place call. Are you trying to do both in the same temporal sequence (i.e. without processing the receipt of order confirm?).

    Edit/Delete Quote Complain
Nab
 

Registered: Sep 2012
Posts: 43

 

09-18-12 02:22 AM


Quote from mickmak:

first question - why do you need to repeat the same order action? If your API connection is disconnected and you reconnect at a later time, (as long as your order time enforcement is OK) you should get all of your open orders back. No need to send those orders back in.



I need the order data back into my application such that I can update it with a new LMT, if needed. However, the returned order data via reqOpenOrders gives the above described problem if I try to resubmit it to update the LMT ... (this problem does not occur with the original order data (no disconnect & reimport), which I can update without any problems via resubmission)

    Edit/Delete Quote Complain
Nab
 

Registered: Sep 2012
Posts: 43

 

09-18-12 02:31 AM


Quote from 2rosy:

its probably your code. without that no one can help



Maybe, but I'm not so sure about that... the code is quite simple.
Basically, I'm just taking the Order openOrder returns and resubmit it with a new m_lmtPrice ...

    Edit/Delete Quote Complain
    
Post A Reply


Receive an email whenever a new post is added to this thread by subscribing to it.
 
Rate This Thread:

Forum Jump:
 

 

   Conduct Rules  -  Privacy Policy  -  Day Trader -  Day Trader Forum -  Best Trading Software -  Sitemap Copyright © 2013, Elite Trader. All rights reserved.    
 
WHILE YOU'RE HERE, TAKE A MINUTE TO VISIT SOME OF OUR SPONSORS:
Advantage Futures
Futures Brokerage & Clearing
AMP Global Clearing
Futures and FX Trading
Bright Trading
Professional Equities Trading
CTS
Futures Trading Software
DaytradingBias.com
Professional Trading Analytics
ECHOtrade
Professional Trading Firm
eSignal
Trading Software Provider
FXCM
Forex Trading Services
Global Futures
Futures, Options & FX Trading
Interactive Brokers
Pro Gateway to World Markets
JC Trading Group
Direct Access Trading
MB Trading
Direct Access Trading
MultiCharts
Trading Software Provider
NinjaTrader
Trading Software Provider
OANDA
Currency Trading
optionshouse
Option Trading & Education
Rithmic
Futures Trade Execution Platform
SpeedTrader
Direct Access Trading
SpreadProfessor
Spread Trading Instruction
thinkorswim by TD Ameritrade
Direct Access TradingAdvertisement
TradersStudio
System Building & Backtesting
Trading Technologies
Trading Software Provider
Trend Following
Trading Systems Provider