☰
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.8K
All Categories
0
Incidents
152
Node JS client
39
Go client
792
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
992
Java client
1.1K
API clients
402
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
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.