Connect to IB demo

Discussion in 'App Development' started by junkone, Jun 10, 2017.

  1. junkone

    junkone

    when I try to connect to IB demo using the stock application that it provides with the samples, I cannot get market data. I am only trying to test it and don't care on quality or timeliness of the data. what stocks will work on the IB demo?
    [​IMG]
    Request -1, Code: 2104 - Market data farm connection is OK:usfuture
    Request -1, Code: 2104 - Market data farm connection is OK:cafarm
    Request -1, Code: 2104 - Market data farm connection is OK:usfarm
    Request -1, Code: 2106 - HMDS data farm connection is OK:ushmds
    Request 30000001, Code: 321 - Error validating request:-'ne' : cause - Please enter exchange
    Request -1, Code: 2104 - Market data farm connection is OK:cashfarm
    Request -1, Code: 2104 - Market data farm connection is OK:usfarm.us
    Request 30000001, Code: 162 - Historical Market Data Service error message:No market data permissions for ISLAND STK
    Request 30000001, Code: 354 - Requested market data is not subscribed.
    Request 40000001, Code: 300 - Can't find EId with tickerId:40000001
    Request 40000001, Code: 420 - Invalid Real-time Query:No market data permissions for ISLAND STK
    Request 30000001, Code: 162 - Historical Market Data Service error message:No market data permissions for ISLAND STK
     
  2. Ryan81

    Ryan81

    Could you run 2 instances of TWS, each one listening on a different API port.... One instance of TWS logged into the demo account, and the other instance logged into your real account that has subscriptions to the market data? Then just use one connection for the data, and the other connection for "everything else" ?

    By the way, if you have a demo account linked to your other IB account (which has data subscriptions), I do believe that the demo account gets access to the market data, as long as you aren't using it in another instance of TWS.
     
  3. junkone

    junkone

    it works from my paper a/c . but when I try with the demo a/c that you can open with ib. its supposed to eb 1 week delayed data. but it does not work as they document it on their website.
    https://www.interactivebrokers.com/en/index.php?f=1286
    the only orders and data that works is forex data
     
  4. ET180

    ET180

    I'm not able to get the IB API working today. Last night, I could not even connect and today I can connect, but my requests are never returned. I'll try again tomorrow.
     
  5. ET180

    ET180

    The API is working for me again as of this morning.
     
  6. I see from the screenshot that you are asking data for a stock (TSLA), but are asking for MIDPOINT pricing. I think that parameter is applicable to forex, not stock. Can you try again with "TRADES", instead of MIDPOINT?
    Others already mentioned that you should ensure that you have subscriptions to the relevant market data.
    Another warning is that sometimes data is not available during weekends (especially Saturdays).
     
    junkone likes this.