Basket Order

subha
I am trying to create a basket order programatically to check the margin requirements. But it is always giving zero values though the parameters are correct

url = "https://api.kite.trade/margins/basket"
headers = {
"Authorization": f"token {API_KEY}:{ACCESS_TOKEN}",
"Content-Type": "application/json"
}


basket = [
{
"exchange": "NSE",
"tradingsymbol": "NIFTY2611327000CE",
"transaction_type": "BUY",
"quantity": 65,
"product": "NRML",
"order_type": "LIMIT",
"price":1
}
,
{
"exchange": "NSE",
"tradingsymbol": "NIFTY2611326500CE",
"transaction_type": "SELL",
"quantity": 65,
"product": "NRML",
"order_type": "LIMIT",
"price":2

}
]


response = requests.post(url, json=basket, headers=headers)
print(response.json())
Can you please suggest where it is failing?
Sign In or Register to comment.