¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

New to TWS API, would like guidance ranking Option Contract price movement


 

Hi all,

?

I am building an app (Java) that scans for and ranks calls/puts by intraday price action.

?

It¡¯s going okay so far, I am at the point where I can successfully get the currentTime and print it to the console.

?

I am going to list the steps that will involve the TWS API and I would like you fine folks to give me some guidance as to how to best achieve each step. I am also using IEX API and will indicate where I will use their service instead of TWS.

?

1.?????? Get a list of all stock symbols on the market (IEX gives me around 9000 symbols)

2.?????? For each symbol x determine if x has any options contracts (Does TWS have a function for this?)

3.?????? Collect and store lastPrice for all option calls/puts repeatedly through the day(I¡¯m okay with this part I think)

4.?????? Do slope math on movements recorded in step (3) ?(I¡¯m okay with this too)

5.?????? Rank contracts (I¡¯m okay with this)

6.?????? Print list of top 10ish by performance at various times throughout the day (I¡¯m okay with this)

?

I am mainly concerned with steps (2) and (3). I know that IEX has the capability to tell me which ticker symbols have calls and puts on them. However, it¡¯s relatively expensive so I would really like to find out how to use TWS API to do this.

As for step (3) I don¡¯t know enough to know if my operation will bog down the TWS server. I¡¯m aware that we can only have 32 clients going and I think the limit is 50 messages per second? If I have 25 clients each making calls slower than 2 calls per second does that mean I will be okay?

I bought the kindle version of Scarpino¡¯s book so if you¡¯d rather point me to good sections there than explain it yourself, I get it.

Thank you all for reading and for any help that might be given.

?

PS: You can get an idea of my level of sophistication as a programmer (i.e. not very), you can check out the results from my long-term investment app at this dropbox link: