☰
Login
Signup
Home
›
Java client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.2K
All Categories
0
Incidents
128
Node JS client
38
Go client
769
.Net API client
362
Kite Publisher
532
.Net / VBA / Excel (3rd party)
435
Algorithms and Strategies
969
Java client
1K
API clients
401
PHP client
3.8K
Python client
331
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.2K
General
In this Discussion
July 2021
sujith
Two-leg gtt giving error "Invalid order params."
SunilChauhan
July 2021
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:
GTT
two-leg
sujith
July 2021
Maybe a coma is missing in between two orders.
Sign In
or
Register
to comment.