Idirect-Tech / Breeze-Python-SDK

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

Breeze infrastructure is faulty #54

Open sudhakarsi opened 6 months ago

sudhakarsi commented 6 months ago

Same piece of code run fine but will through error also.

image

Idirect-Tech commented 6 months ago

Requested to mail the code snippet without credentials to breezeapi@icicisecurities.com

sudhakarsi commented 6 months ago

Below piece of code most of time fails. out of 30 attempts only got data 4 time. Above screen shot is for this code only.

breeze.generate_session(api_secret=SecretKey, session_token=Session)

Connect to websocket(it will connect to tick-by-tick data server)

breeze.ws_connect()

Callback to receive ticks.

def on_ticks(ticks): print("Ticks: {}".format(ticks))

Assign the callbacks.

breeze.on_ticks = on_ticks

subscribe stocks feeds

breeze.subscribe_feeds(exchange_code="NFO", stock_code="BANKNIFTY", product_type="options", expiry_date="10-Jan-2024", strike_price="48000", right="Call", get_exchange_quotes=True, get_market_depth=False)

ws_disconnect (it will disconnect from all actively connected servers)

breeze.ws_disconnect()