Error placing order for BANKNIFTY23OCT44000PE

pavvu_kk
Hi,
I'm trying to place an order for BANKNIFTY23OCT44000PE using Kite API. However, I get an error saying that the instrument is either expired or not existing. I can see the chart in Kite Web using same symbol - https://kite.zerodha.com/chart/web/tvc/NFO-OPT/BANKNIFTY23OCT44000PE/14927362

Any help on what is my mistake here is appreciated.

Kite Request -
POST https://api.kite.trade/orders/regular
exchange=NFO&tradingsymbol=NFO%3aBANKNIFTY23OCT44000PE&transaction_type=SELL&quantity=30&product=MIS&order_type=MARKET

Response Error -
{
"status": "error",
"message": "The instrument you are placing an order for has either expired or does not exist.",
"data": null,
"error_type": "InputException"
}
  • sujith
    Can you enable debug logs and paste the complete stack trace?
  • pavvu_kk
    @sujith here is the debug log

    2023-10-10T06:35:21.184Z 4a07475d-a356-4db2-8f56-d4212a1ba0f2 info DEBUG: POST https://api.kite.trade/orders/regular
    exchange=NFO&tradingsymbol=NFO%3aBANKNIFTY23OCT44000PE&transaction_type=SELL&quantity=30&product=MIS&order_type=MARKET


    2023-10-10T06:35:21.212Z 4a07475d-a356-4db2-8f56-d4212a1ba0f2 info DEBUG: 400 {
    "status": "error",
    "message": "The instrument you are placing an order for has either expired or does not exist.",
    "data": null,
    "error_type": "InputException"
    }
  • sujith
    Can you enable debug logs as mentioned here and give the complete stack trace?
  • sujith
    The above params look fine. I think issue is something else.
  • pavvu_kk
    hey @sujith done that already using
    kite = new Kite(apikey, Debug: true);
  • rakeshr
    tradingsymbol=NFO%3aBANKNIFTY23OCT44000PE
    You don't need to add an exchange name in the trading symbol, but just the trading symbol as available from the instrument list. Eg: tradingsymbol=BANKNIFTY23OCT44000PE
  • pavvu_kk
    @rakeshr - is this true no matter which symbol I use? E.g. if I have to trade one of SBIN, SBIN23OCTFUT, or SBIN23OCT600CE, i don't need to prefix with NSE (for spot) or NFO (for derivative)? Thanks in advance
  • sujith
    Tradingsymbol refers to only the name of the instrument you want to trade with. Exchange value is sent on another param.
Sign In or Register to comment.