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

Discussion in 'App Development' started by Ben3211, Nov 2, 2021.

  1. traider

    traider

    Open source it so that others can contribute
     
    #11     Nov 3, 2021
  2. Ben3211

    Ben3211

    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
     
    #12     Nov 3, 2021
  3. Ben3211

    Ben3211

    Yes true,
    I'll clean up my code and create a github repo.
     
    #13     Nov 3, 2021
  4. Ben3211

    Ben3211

    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: Nov 3, 2021
    #14     Nov 3, 2021
  5. Ben3211

    Ben3211

    Thanks
    I'll have a look
     
    #15     Nov 3, 2021
  6. Ben3211

    Ben3211

    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: Nov 3, 2021
    #16     Nov 3, 2021
  7. traider

    traider

    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.
     
    #17     Nov 3, 2021
  8. 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.
     
    #18     Nov 3, 2021
    Ben3211 likes this.
  9. Ben3211

    Ben3211

    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.
     
    #19     Nov 4, 2021
  10. Ben3211

    Ben3211

    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: Nov 4, 2021
    #20     Nov 4, 2021