basket_order_margins giving error very frequently

pseudo
pseudo edited July 2023 in Python client
My Code example for today:
order_param_basket = [{'exchange': 'NFO', 'tradingsymbol': 'BANKNIFTY2371344800CE', 'transaction_type': 'SELL', 'variety': 'regular', 'product': 'MIS', 'order_type': 'MARKET', 'quantity': 25}, {'exchange': 'NFO', 'tradingsymbol': 'BANKNIFTY2371344800PE', 'transaction_type': 'SELL', 'variety': 'regular', 'product': 'MIS', 'order_type': 'MARKET', 'quantity': 25}]
kite.basket_order_margins(order_param_basket, mode='compact')

Following is the error: "error computing charges: could not get instrument details : instrument not found: NSE:BANKNIFTY2371344800CE"

My algos are failing often due to these errors, I have also implemented retries after every 1 sec for 10 times, but not helping. Please help asap.
  • sujith
    As the error explains the instrument name can't be found in the NSE exchange, it should be NFO exchange.
  • pseudo
    basket seems correct, looks like something is going wrong elsewhere in code. Thank you for your quick response.
Sign In or Register to comment.