Need to handle websocket data for 10,000 symbols.

Discussion in 'App Development' started by hardik dhankecha, Mar 1, 2019.

  1. DaveV

    DaveV

    Windows, using C#
     
    #11     Mar 2, 2019
  2. carrer

    carrer

    Windows are known for not being able to handle many socket connections.
    Linux might be able to accomplish what you are trying to do. I am not sure how a C# application behaves on Wine. You might want to rewrite it in Java/Python.
     
    #12     Mar 2, 2019
  3. what kind of realtime data does the company provide? realtime level 1 quote for all US stocks? I can not find the information from their website. it only says realtime data.
     
    #13     Mar 2, 2019
  4. ZBZB

    ZBZB

    #14     Mar 2, 2019
  5. otctrade

    otctrade

    I don't think subscribing to 10000 symbols separately will work.

    The way I did it in node is to build an object of all the symbols I want to track. Here is a simplified version.Mine had about 5,000 symbols.
    let symbols = {
    'AAPL' : true,
    'GOOG' : true
    };

    if (symbols['AAPL']) console.log('exists'); else console.log('does not exist');


    symbols['AAPL'] you would replace with symbols[msg.sym] or whatever the field is for the incoming symbol

    I'm sure there is a way to do this in C# too
     
    #15     Mar 3, 2019
  6. The top 2000 symbols have 99% of the volume so there is effectively no difference in performance between subscribing 2000 or 25000.
     
    #16     Mar 3, 2019
  7. Do you get an error 1006 when the websocket closes? If so I am getting the same error.
     
    #17     Mar 3, 2019
  8. I am on windows and using C# for development.
     
    #18     Mar 3, 2019
  9. carrer

    carrer

    Windows are known for not being able to handle many socket connections.
    Linux might be able to accomplish what you are trying to do. I am not sure how a C# application behaves on Wine. You might want to rewrite it in Java/Python.
     
    #19     Mar 4, 2019
  10. DaveV

    DaveV

    Sorry I didn't record the error code, and I have totally replaced the WebSocket code with NATS so I have no way to retest.
     
    #20     Mar 4, 2019