calculating basket margin with list of orders in json format throws "incorrect json format"

arulchellappa
data = [{"exchange":"NFO","tradingsymbol":"NIFTY22DEC18800CE","transaction_type":"BUY","variety":"regular","product":"NRML","order_type":"LIMIT","quantity":50,"price":0.05,"trigger_price":0,"squareoff":0,"stoploss":0},{"exchange":"NFO","tradingsymbol":"NIFTY22DEC18400CE","transaction_type":"SELL","variety":"regular","product":"NRML","order_type":"LIMIT","quantity":50,"price":298,"trigger_price":0,"squareoff":0,"stoploss":0}]


This throws
{'status': 'error', 'message': 'invalid json', 'data': {}, 'error_type': 'InputException'}

please clarify where iam wrong
  • rakeshr
    {'status': 'error', 'message': 'invalid json', 'data': {}, 'error_type': 'InputException'}
    Looks like you are directly making an HTTP Post call with the above payload. If yes, make sure you are sending header Content-Type as application/json. Go through the HTTP Post example here.
    As you have tagged the Python client, in your thread. For the python basket order example, go through it here.
Sign In or Register to comment.