Is there a limit of number of tickers we can get data for?

Was trying to get prices of some tickers and then compare them between each other. The code used to run before but is failing now with the following errors

 

/usr/local/lib/python3.8/dist-packages/blueshift_data/readers/library.py:1647: BlueshiftWarning: Too many assets for data query. Results will be truncated.
  warnings.warn(msg, BlueshiftWarning)
Blueshift Alert[2022-10-03 09:45:00+05:30] ERROR in algorithm:Fatal error in strategy, will exit: Equity(BURNPUR [145]). See log for more details.

Is there some limit now on number of tickers ?

Appreciate any workround for this one.

Yes, there is a limit of 200 stocks from 2.1.0 release. This is to safeguard against unexpected behaviour in live trading (most brokers will not allow > 200 stocks for live data feed at the same time) as well as to ensure fair usage among the users.



If you required more than 200 for daily data query, please use the pipeline APIs. If you are using it for minute data query, the work around is to split the query into multiple data.history calls. But we highly discourage this and may ban such calls in a future release.

@prodipta I only need day end data for all these stocks and not minute level. even now i am querying data one by one only just that i think the run is cancelled after it has queried it for the 200th stock. essentially trying to compare growth rate of each of the stock in the defined universe and pick few of them. Possible to do this through pipeline APIs? And is that something that needs to be done outside blueshift platform ?

You can definitely do that using pipeline api, from within Blueshift backtesting conetxt. Check out this tutorial for an intro to pipelines (this maybe slightly outdated, not yet updated for the platform version change). Also, check this strategy code for an example - where we fetch the past 12 month returns for ALL stocks in the universe (and filter top and bottom fews).