insert variable in payload
-
price=14900
payload = "{\n"exchange": "NFO",\n"triggerprice": "price",\n"tradingsymbol": "NIFTY25FEB21FUT",\n"quantity": 4,\n "symboltoken": "60530",\n "duration": "DAY",\n"disclosedquantity": 0,\n"transactiontype": "BUY",\n"ordertype": "STOPLOSS_MARKET",\n"variety": "STOPLOSS",\n"producttype": "CARRYFORWARD"\n}"how to put variable "price" inside "payload parameter"
-
@panda1234 problem solved
thank you -
@admin it shows one error:
TypeError: can't concat str to bytes -
Hi @panda1234 , use below request body to place stop loss orders
{"exchange": "NFO", "tradingsymbol": "NIFTY25FEB21FUT", "quantity": 75, "transactiontype": "BUY", "ordertype": "STOPLOSS_MARKET", "variety": "STOPLOSS", "producttype": "CARRYFORWARD", "price": 0, "triggerprice": 14900,"symboltoken": "60530","duration":"DAY"}