Running the TWS Python API Multi-threaded?
I am running a trading strategy that gathers data from many different instruments, and can make 10-20 trades in a matter of minutes. Sometimes the order don't get filled so there can be a high load on
By
fuchs.yoni@...
·
#52234
·
|
Re: automatic adjustment of stop limit in bracket order based on fill price
By
mikey823
·
#52233
·
|
Re: automatic adjustment of stop limit in bracket order based on fill price
There is no API that gives this automatically. The basic idea would be to have execution callback handler monitor fill average price, and re-adjust order after that.
By
biney59@...
·
#52232
·
|
Re: Unrealisedpnl
Unrealized PnL is basically *( avg_position_price - current_ticker_price ) * position_size* for longs, and *( current_ticker_price?- avg_position_price?) * position_size* for shorts.
By
biney59@...
·
#52231
·
|
Re: what is the right internet connection speed?
I repeat: 10 * 1000 * (100 + 50) = 1,500,000 BYTES per second (ie 1.5 megaBYTES per second) Which is 15 megaBITS per second (approx). Sent: Thursday, December 28, 2023 12:35 AM To: [email protected]
By
Richard L King
·
#52230
·
|
Re: what is the right internet connection speed?
Thanks for all the replies.? I feel much better.
By
zlzhao22@...
·
#52228
·
|
Re: what is the right internet connection speed?
Do you (anyone) find cloud services useful? Thank you.
By
Oscar Castillo
·
#52227
·
|
Re: what is the right internet connection speed?
10 instruments, the busiest ones, maybe 50 Kbps at the open total, and half that the rest of the day.? Maybe 100Kbps tops when something huge happens for a brief minute.? So your 100MB is enough to
By
rossh_yh
·
#52226
·
|
Re: what is the right internet connection speed?
Oops, sorry you said your connection was 100 Mbps, not 400 Mbps. Still 15 Mbps is a low level of utilisation, only 15%, so still no problem. Richard Sent: Wednesday, December 27, 2023 10:56 AM To:
By
Richard L King
·
#52225
·
|
Re: what is the right internet connection speed?
It¡¯s not easy to give a precise answer, but let¡¯s make some very broad assumptions that will give us some kind of indication. Assume: * Each tick-by-tick stream generates 1000 events per second
By
Richard L King
·
#52224
·
|
Unrealisedpnl
Hi, how to retrieve unrealied pnl for the current open position only? existing call back method includes previously closed positions pnl also into unrealised pnl. Thanks Anil
By
anil polineni
·
#52223
·
|
what is the right internet connection speed?
Hello, suppose I need to receive 10 tick-by-tick streaming data from my api, what is the right internet connection speed requirement?? Right now, my ISP has 100 MB and I am not sure if it is enough.
By
zlzhao22@...
·
#52222
·
|
position return from reqPosition() does not have comboLegs filled
Do there is a way to return combo information for existing combo option positions? Call reqPosition only return legs for combo position with comboLegs as empty list and blank comboLegsDescription.
By
Jim HUANG
·
#52221
·
|
Merry Christmas and/or Happy Holidays to all
Hi All, Merry Christmas and/or Happy Holidays. Thanks to all, especially to J¨¹rgen, Richard and countless others, for all the help you've given me over the years. Thanks, as always, Lou Dudka
By
Lou Dudka
·
#52220
·
|
Re: Is there a way to automate retrieving margin report?
There is no API request that generates a "Margin Report", but then I am not so sure that such a report would be terribly helpful since your client would have to analyze the report to make the data
By
J¨¹rgen Reinold
·
#52219
·
|
Re: Is there a way to automate retrieving margin report?
If you submit a fully liquidating "what if" ( https://interactivebrokers.github.io/tws-api/margin.html ) order for each position, you will see the margin impact of each position.
By
Kevin R Keane
·
#52218
·
|
Re: Is there a way to automate retrieving margin report?
No, it doesn't.? I think reqAccountSummary only shows the margin status for the account,? but what I want to see if the margin requirement of every ticker.? Please let me know if I am not correct.
By
@jiamin
·
#52217
·
|
Re: Is there a way to automate retrieving margin report?
Does not reqAccountSummary satisfy your requirements?
By
bespalex
·
#52216
·
|
Re: Reconnect
Found a solution: 1. app.disconnect() 2. app.connect() 3. restart api thread 4. restart data requests working nicely so far. Any issues with this approach?
By
bespalex
·
#52215
·
|
Re: How to Get SPX/SPXW Quote price or current price
JavaScript is not one of the IBKR TWS APIs we are focused on here. So you'd have to reach out to the makers/group that supports that version. TWS 10.19 is fine and has a server version of 173. There
By
J¨¹rgen Reinold
·
#52214
·
|