Received the below error while executing the option symbol through python code.
NSE:BANK NIFTY25DEC3059200PE
place_order response = {‘code’: -50, ‘message’: ‘The input symbol is invalid.’, ‘s’: ‘error’}
Received the below error while executing the option symbol through python code.
NSE:BANK NIFTY25DEC3059200PE
place_order response = {‘code’: -50, ‘message’: ‘The input symbol is invalid.’, ‘s’: ‘error’}
Hi @sharath_babu_j,
There is an extra space in the symbol name. For the Dec 30 expiry symbol, the expiry day is not required since it is a monthly expiry.
The correct symbol name is NSE:BANKNIFTY25DEC59200PE.
You can refer to the documentation to understand the symbol format in more detail:
https://myapi.fyers.in/docsv3#tag/Appendix/Symbology-Format
I’ am trying to fetch the market depth using the same symbol format, but its not working . returning the error :Market Depth API Response: {‘message’: ‘Please provide valid inputs’, ‘code’: -50, ‘s’: ‘error’}, the format i’ am using is : NSE:NIFTY2610625250PE.
Hi Mohan,
Please recheck your payload, or share it here, we can help you identify where the error might be.
Hi Naresh,
Please find the Few section of my code where i’ am trying to use fyers. depth. In the option symbol i am passing the same option symbol that i am using for fetching the option chain, my option chain is responding correctly , but my depth is giving me error:
Market Depth API Response: {‘message’: ‘Please provide valid inputs’, ‘code’: -50, ‘s’: ‘error’}
Could not fetch market depth for NSE:NIFTY2610625250CE: ‘d’
access_token = load_token()
fyers = fyersModel.FyersModel(token=access_token, is_async=False)
data = {"symbols":option_symbol,
"ohlcv_flag":"1"}
response = fyers.depth(data=data)
print("Market Depth API Response:",response)