softwarespartan / IB4m

Interactive Brokers API for Matlab
GNU General Public License v2.0
62 stars 21 forks source link

Problems using a paper account -- data subscription issues #158

Closed jcdevin closed 3 months ago

jcdevin commented 3 months ago

Hi, I'm new to using this library, and I have some issues. I was able to connect using the port 7497 (paper account)., but when running:

MarketDataExample

I get the following:

-1 501 Already connected. -1 501 Already connected.

0 10089 Requested market data requires additional subscription for API. See link in 'Market Data Connections' dialog for more details.Delayed market data is available.SPY ARCA/TOP/ALL 0 10089 Requested market data requires additional subscription for API. See link in 'Market Data Connections' dialog for more details.Delayed market data is available.SPY ARCA/TOP/ALL

Questions: Can a test paper account use the IB's API with delayed data? Or is it necessary to have a production account active for the paper account work? Am I missing some configuration?

I really appreciate any help you can provide.

Rgds JC

Despair2000 commented 3 months ago

I never tried using my paper account without having a production account but the error message clearly states that delayed data is available. However the MarketDataExample would probably have to be adapted to receive delayed data. One important detail is that delayed data comes via a market meta data event and not via the usual market data event.

TukanKolor commented 3 months ago

If i remember correctly i had to put some amount of money into a production account and sign up for market data there before being able to use the paper account with data.

jcdevin commented 3 months ago

Thank you Despair2000 and TutanKolor, you both are correct. I must have a production account with funds to get market data in the paper account. IB requires a minimum of US$500 to provide regular market data, otherwise have to pay for it. I already did this and have real-time market data in both environments.