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? 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
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.
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
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.
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).