Screener real-time stock market data, using ib api and python.

Thank you all for your answer.I'll bring more precision.


A high performance screener is not my goal at the moment.
fetched data from IB API is not a problem.If the tick by tick is too “greedy”, I would use the snapshots.
I'm running the program on around 50 tickers at the moment, with different data like high, low, open…

In a first time, I'm not looking for optimization, I want to find a way to use this data to interact with, and make it appear on a table and evoluate in real time.

From your answers, the use of a database seems mandatory, am I correct?
I understood the problem of sql database, is it still possible to use it for the beginning ?
Do you move more precision about the other kind of database I can use ?

Do you think that tkinter treeview or pandasTable are suitable tools for retrieving, manipulating and viewing data in a screener?

Thanks,
Ben
 
This is not a trivial task. It takes time and resources.
IMO such projects succeed only if in advance a good financing of everything that's necessary for the project is assured (ie. manpower, server(s), fast Internet connection(s), funds aka money, etc.).

Have you already made the calculations for necessary storage space and bandwidth? These are the very basics to start with, IMO.
In a first time I'm just looking for a functional project
Doesn't matter if there is some latency.

Can you give me more information about your last message, the in-memory DB and internet server ?
 
Last edited:
if you know what you're doing this is a trivial task. You can get you're data from ib and relay it to: influxdb, pipelinedb, timescale.com, apache pulsar or flink. Or write your own online algorithm for screening.
Getting realtime data and loading into a relational db to then use SQL is :banghead:
Thanks
I'll have a look
 
What kind of data are you talking about? What kind of selection criteria do you want to use to rank the tickers?
And with "real time" do you mean tick-by-tick price data? Or e.g. price every minute, hour, ...?
Hi HobbyTrading

I talk about stocks data as "high, low, open, close" then add a column with some indicator's calculation, as spread between "open" and "high".
Also, hide or delete tickers from the screener if it doesn't respect a condition.
Example : if a stock's variation is greater than 1% since the open, make it appear in a screener.
Example: I calculated the spread between "last price" and "vwap", this is the "spread" column, then sort by order according to the "spread" column.

yes It will be tick-by-tick data or short snapshot (every 220ms or 1s..)

Thanks
 
Last edited:
Hi HobbyTrading

I talk about stocks data as "high, low, open, close" then add a column with some indicator's calculation, as spread between "open" and "high".
Also, hide or delete tickers from the screener if it doesn't respect a condition.
Example : if a stock's variation is greater than 1% since the open, make it appear in a screener.
Example: I calculated the spread between "last price" and "vwap", this is the "spread" column, then sort by order according to the "spread" column.

yes It will be tick-by-tick data or short snapshot (every 220ms or 1s..)

Thanks

Who is your enduser? If you just doing it for your own use the UI portion is not really necessary and you are just wasting time on that. Just write all the data queries in code and iterate fast.
 
yes It will be tick-by-tick data or short snapshot (every 220ms or 1s..)
At IB is the real tick-by-tick data limited to only a few tickers at a time. So you won't be able to keep track of 50 tickers in this way (you mentioned that you want to use about 50 symbols in your screener). So most likely you'll have to use the regular market data, which is throttled to at maximum one price per 250 ms per ticker. This will not severely load your network connection and shouldn't be a problem. What you will need to consider is how much calculations you want to do after you have received new price data. And whether your software can handle that. It could be that this may decide in what way you store your data and/or what kind of database you can use.
 
Who is your enduser? If you just doing it for your own use the UI portion is not really necessary and you are just wasting time on that. Just write all the data queries in code and iterate fast.
it's for me, friends , passionated about trading and programming, practicing.
What's do you mean whithout UI, I need interface to see the results. But yes, this has to be as simple as possible.
 
At IB is the real tick-by-tick data limited to only a few tickers at a time. So you won't be able to keep track of 50 tickers in this way (you mentioned that you want to use about 50 symbols in your screener). So most likely you'll have to use the regular market data, which is throttled to at maximum one price per 250 ms per ticker. This will not severely load your network connection and shouldn't be a problem. What you will need to consider is how much calculations you want to do after you have received new price data. And whether your software can handle that. It could be that this may decide in what way you store your data and/or what kind of database you can use.
Do you have an idea about which module, libraries ?:)
Cause pandasTable and treeview make me crazy.
So perhaps two programs, because some indicators or calculi need previous values as pivot points, atr... And for that, the database seams needful.
Do you have an idea about database who can make the job ? We don't need high performance at this moment.

Thanks HobbyTrading
 
Last edited:
Back
Top