Jump to content
maesterfitch

TWS API Python help needed

Recommended Posts

Hello,

I've been trying to follow along with the following Interactive Brokers lessons on IB API:  https://youtu.be/aSdi667LGp0?t=251

The code that I am testing is the exact code from the video and can also be found in the attached PDF. The purpose is to simply print live data tick by tick. The issue I am having is that it works when I run the program... and then it doesn't. When it fails to return live market data, it displays "Process finished with exit code 0" meaning that there were no errors. If the code failed outright it would be easier to troubleshoot but it is very perplexing that it sometimes works and sometimes doesn't. Any help would be appreciated. Any alternate code to test the same concept would also be helpful!

M Fitch

 

System and software details:

Windows 10

TWS stable windows x64

TWS API install 9.76

IntelliJ

 

TA-2018-TWS-Python-Receiving-Market-Data-Study-Notes.pdf

Share this post


Link to post
Share on other sites

hi @maesterfitch

from what I know, IB does not provide tick-by-tick data ... never .... ever ... not even for their own TWS platform ....

they use a technology called snapshots and they provide 5s updates on the most updated charts and T&S so there is no way to get tick-by-tick from their API.

Also, go to the documentation,  your API queries will be queue if they are above the limitation meaning, that you can only do a certain amount of queries every 15 seconds.

Hope I helped u with some information

Share this post


Link to post
Share on other sites
On 7/23/2020 at 11:08 AM, Paul aka Aurbano said:

hi @maesterfitch

from what I know, IB does not provide tick-by-tick data ... never .... ever ... not even for their own TWS platform ....

they use a technology called snapshots and they provide 5s updates on the most updated charts and T&S so there is no way to get tick-by-tick from their API.

Also, go to the documentation,  your API queries will be queue if they are above the limitation meaning, that you can only do a certain amount of queries every 15 seconds.

Hope I helped u with some information

Hi, it looks like IB has tick data available, but you can only subscribe to a few instruments simultaneously. 


https://interactivebrokers.github.io/tws-api/tick_data.html

https://ib-insync.readthedocs.io/api.html?highlight=tick#ib_insync.ib.IB.reqTickByTickData

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.