☰
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
126
Node JS client
36
Go client
765
.Net API client
360
Kite Publisher
532
.Net / VBA / Excel (3rd party)
433
Algorithms and Strategies
964
Java client
1K
API clients
400
PHP client
3.8K
Python client
331
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.1K
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.