Re: Trailing Stop/Stop-Loss Combo
In the openOrder callbacks, also print order object fields ocaGroup and ocaType for the order objects you receive from IBKR. You will see values only for the child orders and should verify that,
By
Jürgen Reinold
·
#53220
·
|
Re: Trailing Stop/Stop-Loss Combo
Just to follow up, I have the following code for placing the bracket order, and below that is the data returned from a call to openOrder.
Code to place order:
# -- CONTRACT INTO --
mycontract =
By
scott_hopgood@...
·
#53219
·
|
Re: Trailing Stop/Stop-Loss Combo
Thanks Jürgen for your most helpful reply. Just the solution I was looking for.
Cheers, Scott.
By
scott_hopgood@...
·
#53218
·
|
Re: Trailing Stop/Stop-Loss Combo
When you place a Bracket Order (a parent plus several child orders all for the same instrument), IBKR wraps the child orders into a One Cancels All (
By
Jürgen Reinold
·
#53217
·
|
Re: TWS not connecting throwing a timeout error as port is stuck in (CLOSE_WAIT) state
That would work but is obviously much heavier weight than the test in flask.
But as I said before, just sending the "hello" message from flask on sockets that do connect to TWS/IBGW is sufficient,
By
Jürgen Reinold
·
#53216
·
|
Trailing Stop/Stop-Loss Combo
Hey guys,
I have created a Python program that connects to the TWS API and places bracket trades when certain market conditions are met. The program is working as intended with one exception. I would
By
scott_hopgood@...
·
#53215
·
|
Re: TWS not connecting throwing a timeout error as port is stuck in (CLOSE_WAIT) state
Thanks for getting back and attaching that message flow.
Assuming the issue here, if I change my code to rather connect with ib-insync APIs ib.connect(), get current equity value or cash or
By
mubbashirali35@...
·
#53214
·
|
Re: TWS not connecting throwing a timeout error as port is stuck in (CLOSE_WAIT) state
That is_port_open check will cause what you experience.
TWS/IBGW are allergic to socket connections that do not actually start the? TWS API protocol (e.g. disconnect the socket without having sent
By
Jürgen Reinold
·
#53213
·
|
TWS not connecting throwing a timeout error as port is stuck in (CLOSE_WAIT) state
Hey, guys. I hope everyone is doing great.
I have a sporadic problem occurring when I cannot connect with TWS, it gives a timeout error, and on checking the port it's usually stuck in the CLOSE_WAIT
By
mubbashirali35@...
·
#53212
·
|
Re: Create a self updating list of executions
My bad, my previous suggestion was incorrect, based on my own wrapper around the ReqExecutions request. The filter must be present but in order to initalize it I use the constructor that takes no
By
ds-avatar
·
#53211
·
|
Create a self updating list of executions
Is there a possibility to create a self-updating list of executions iwthin the API?
Right now I use every account update to pull executions for the updated contract and isolate the last trade but
By
domahan@...
·
#53209
·
|
irregular behavior of cancelled orders
Hi:
After recent TWS updates I started to observe some irregular behavior of cancelled orders, that never happened before.
I catch an OpenOrder order cancelled message as usual, but the order appears
By
bespalex
·
#53208
·
|
Re: secID empty
@ds-avatar is correct, but let me add a little context.
The SecIdType ( https://interactivebrokers.github.io/tws-api/classIBApi_1_1Contract.html#a7fa1428a037567a1b0c32ff77e22b3ce ) and SecId (
By
Jürgen Reinold
·
#53206
·
|
Re: secID empty
1) At least for stocks, you have to be subscribed to ISINs in IBKR market data centre to receive them.
2) Then, to get the ISIN you need to look up ContractDetails for the issue in question and
By
ds-avatar
·
#53205
·
|
secID empty
I am trying to retrieve all executions with according ISIN by using secID but the response to secID seems to be empty. Can anyone tell me what I am doing wrong?
By
domahan@...
·
#53204
·
|
Re: No real-time data after IB nightly server reset
I must have read your initial post to quickly and had not realized the fact that you have a docker containerized setup. While I understand how both work, I use neither Docker nor IBC so that I cannot
By
Jürgen Reinold
·
#53203
·
|
Re: No real-time data after IB nightly server reset
Hi Jürgen ,
I tried your suggestion of not disconnecting after reestablishing the connection with IB after the nightly reset this morning but had the same problem i.e. no real-time data. My logs are
By
farhanferoz@...
·
#53202
·
|
Building a real time feed: reqMktData vs reqHistoricalData vs reqRealTimeBars (with keepUpToDate=True)
The TWS API provides many ways to request live data and I am confused about the best approach. Below are at least 3 methods I am aware of, with some notes based on my tests and what I've read.
I've
By
jplem
·
#53201
·
|
Re: Sometimes no data delivered by callback
Hi,
i changed everything according to your suggestion and will make use of realtimebars callback. If anything goes wrong i will let you know.
regards,
Simon
By
simon.meier1987@...
·
#53200
·
|
Re: No real-time data after IB nightly server reset
No worries about the open orders. The reset only relates to the connections with IBKR, TWS maintains state, remembers open orders that were placed before connection is lost, and order callbacks
By
Jürgen Reinold
·
#53199
·
|