Idirect-Tech / Breeze-Python-SDK

The official Python client library for the ICICI Securities trading APIs
MIT License
53 stars 28 forks source link

get_quote() Error #90

Open srikanthvbr opened 2 months ago

srikanthvbr commented 2 months ago

While looping through the stocks to get 5 min candle data, using the following python code, getting random error for random stocks. This error does not have a pattern. It appears randomly and does not load data for the stock. proceeds to the next stock. Is there any gap that needed to be provided between every get_historical_data_v2 call?

data = breeze.get_historical_data_v2( interval="5minute", from_date=from_date.strftime("%Y-%m-%dT%H:%M:%S.000Z"), to_date=to_date.strftime("%Y-%m-%dT%H:%M:%S.000Z"), stock_code=symbol, # Pass one stock symbol at a time exchange_code="NSE", product_type="cash" )

Error :

2024-04-21 13:46:20.113557 2024-04-21 13:46:20.113557 COLPAL COLPAL - 2650.65 APOHOS get_quotes() Error APOHOS - 6170.05 HINDAL HINDAL - 614.5 CIPLA get_quotes() Error CIPLA - 1345.35 ICILOM get_quotes() Error ICILOM - 1689.3 NESIND NESIND - 2437.1 ADAPOR ADAPOR - 1310.55 NTPC NTPC - 350.9 RELIND get_quotes() Error get_quotes() Error 5254