Two-leg gtt giving error "Invalid order params."

SunilChauhan
SunilChauhan edited July 2021 in Java client
Curl Request for two-leg mentioned below

curl https://api.kite.trade/gtt/triggers \
-H 'X-Kite-Version: 3' \
-H 'Authorization: token api-key:accessToken' \
-d 'type=two-leg' \
-d 'condition={"exchange":"BSE", "tradingsymbol":"RELIANCE", "trigger_values":[2000.50, 2200.50], "last_price": 2020.50 }' \
-d 'orders=[{"exchange":"BSE", "tradingsymbol": "RELIANCE", "transaction_type": "SELL", "quantity": 1, "order_type": "LIMIT","product": "CNC", "price": 2000.50}{"exchange":"BSE", "tradingsymbol": "RELIANCE", "transaction_type": "SELL", "quantity": 1, "order_type": "LIMIT","product": "CNC", "price": 2200.50}]'

giving error as
{"status":"error","message":"Invalid order params.","data":null,"error_type":"InputException"}

for single leg it working perfectly fine.
curl https://api.kite.trade/gtt/triggers \
-H 'X-Kite-Version: 3' \
-H 'Authorization: token api-key:accessToken' \
-d 'type=single' \
-d 'condition={"exchange":"BSE", "tradingsymbol":"RELIANCE", "trigger_values":[2200.50], "last_price": 2020.50}' \
-d 'orders=[{"exchange":"BSE", "tradingsymbol": "RELIANCE", "transaction_type": "SELL", "quantity": 1, "order_type": "LIMIT","product": "CNC", "price": 2200.50}]'

{"status":"success","data":{"trigger_id":50962131}}

Please HELP
Tagged:
Sign In or Register to comment.