zerodha / pykiteconnect

The official Python client library for the Kite Connect trading APIs
MIT License
965 stars 462 forks source link

While placing basket Order margin request,Input exception error was shown #168

Closed arul67800 closed 1 year ago

arul67800 commented 1 year ago

Data Provided json_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, }, ]

Exception:

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

ranjanrak commented 1 year ago

Hi @arul67800

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

Looks like you are making a request with an invalid JSON format. Go through the example request format here.

arul67800 commented 1 year ago

Can you see my json and rectify..i don't think so

arul67800 commented 1 year ago

I picked the json directly from the request sent from kite..what else am i missing..please try and update