IB API and placing orders

I have a question about Interactive Brokers API and placing orders in US stocks.

When I transmit orders threw API the orders are also triggered in Pre- and After hours trading. I want that the orders are only triggered during Regular Trading Hours.

Has anybody an idea who I can solve this problem???

Thanks,
FT79
 
Quote from FT79:

I have a question about Interactive Brokers API and placing orders in US stocks.

When I transmit orders threw API the orders are also triggered in Pre- and After hours trading. I want that the orders are only triggered during Regular Trading Hours.

Has anybody an idea who I can solve this problem???

Thanks,
FT79

The Order class (Java API) has ignoreRth, tif, goodAfterTime and goodUntilDate fields.
 
There are two extended order attributes that pertain to orders executing outside regular trading hours.

int rthOnly – This attribute pertains to all orders placed through the API when this is set to 0 then orders will trigger outside normal trading hours when set 1 then orders will only trigger within normal trading hours.

boolean m_ignoreRth – This attribute corresponds to the TWS trigger method setting “Allow triggering outside of regular trading hours”. This attribute allows Stop orders on the Globex exchange to be trigger outside regular trading hours.

In addition, I’d like to use this thread as a place where IB API users can make suggestions for new features and comment on the performance of current ones. We are in the process of creating an API support team that will provide a higher level of implementation and testing assistance. We would also like to start maintaining a wish list of programming changes we can add to our development queue.

Please feel free to post any questions about our API services.
 
Quote from IB-Mike-API:

There are two extended order attributes that pertain to orders executing outside regular trading hours.

int rthOnly � This attribute pertains to all orders placed through the API when this is set to 0 then orders will trigger outside normal trading hours when set 1 then orders will only trigger within normal trading hours.

boolean m_ignoreRth � This attribute corresponds to the TWS trigger method setting �Allow triggering outside of regular trading hours�. This attribute allows Stop orders on the Globex exchange to be trigger outside regular trading hours.

In addition, I�d like to use this thread as a place where IB API users can make suggestions for new features and comment on the performance of current ones. We are in the process of creating an API support team that will provide a higher level of implementation and testing assistance. We would also like to start maintaining a wish list of programming changes we can add to our development queue.

Please feel free to post any questions about our API services.

Dear Mike,

Thanks for helping me out! Is it also possible to program API so I don't have any shortposition in a US Stock (or a TWS setting), although my system wants to sell short? Because my system has only been backtested for going long in a US stock, not for short positions and in one occassion I had short position because of the extreem movements.

Thanks,
FT79
 
Unfortunately there is not a setting in the TWS that can be configured to prohibit shorting in a margin account. That restriction would need to be enforced within the your API.
 
Quote from IB-Mike-API:

Unfortunately there is not a setting in the TWS that can be configured to prohibit shorting in a margin account. That restriction would need to be enforced within the your API.

Thanks for your response
 
Back
Top