Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Live Trading limits

Anybody knows if there is a limit in the number of bars and securities that you can ask to data.history in Interactive Brokers
data.history(context.security_list,'high',7200,'1m') Could that call to data.history with an universe of 20-30 securities?
What are the quantopian limitations and IB limitations about these issues?
Thanks

1 response

Hello -

There is no hard limit to the number of securities that you can track. There are practical limits, though.

  • Your example shows 7200 minutes requested, times 30 securities, is 216,000 prices. Part of the practical limit is how much memory you have. So, if you can lower the number of minutes requested, the number of securities you can track goes up.
  • The lower trading volume, the slower the history query. Generally, you can query the top-traded 2000 stocks using history. But if you tried to query the bottom stocks, the query would time out. (This has to do with the lookup costs when doing forward fills of thinly traded stocks).

If your algorithm runs in backtest, it will generally run in live trading. So go ahead and create your algorithm. If you run into limits we can often help you get around them with coding performance improvements.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.