Missing or empty field `exchange`

falsefact
I'm trying to hit following request from java client. But getting 400 error. The client doesn't spit any message. But when I tried curl with same request, it says
`Missing or empty field `exchange``
curl https://api.kite.trade/orders/regular \
-H "X-Kite-Version: 3" \
-H "Authorization: token xxx:yyy" \
-d "{'exchange':'NFO','product':'MIS','quantity':40,'tradingsymbol':'FINNIFTY2371120150CE','validity':'DAY','tag':'order:A:1','transactionType':'SELL','orderType':'MARKET'}"


{"status":"error","message":"Missing or empty field `exchange`","data":null,"error_type":"InputException"}
Tagged:
  • falsefact
    update: the same code started working since a few minutes back. I'm able to place orders now.
    This is strange behaviour. Unpredictability doesn't help.
  • rakeshr
    Header content type should be URL encoded --header 'Content-Type: application/x-www-form-urlencoded' and form input data should be in the same format as given in the examples.
Sign In or Register to comment.