☰
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
14.7K
All Categories
0
Incidents
172
Node JS client
49
Go client
824
.Net API client
394
Kite Publisher
552
.Net / VBA / Excel (3rd party)
484
Algorithms and Strategies
1K
Java client
1.2K
API clients
408
PHP client
4.2K
Python client
357
Mobile and Desktop apps
1.5K
Market data (WebSockets)
3.5K
General
In this Discussion
September 11
sujith
September 12
vishalgyadav
September 8
Nivas
Modify GTT return exception while modifying GTT more than Once
vishalgyadav
September 8
in
Java client
Hi, I am trying to modify a GTT multiple times, It work for the first time, but does not work after the first modification
Trading Symbol : BANKNIFTY25SEP53800CE
Placing Order : {product=MIS, quantity=35, trigger_price=965.0, price=970.0, tradingsymbol=BANKNIFTY25SEP53800CE, exchange=NFO, validity=DAY, transaction_type=BUY, gtt_params=[[1,-5],[1,5]], order_type=SL, disclosed_quantity=0, market_protection=0.0}
Order Update: 250908100492210 Status: TRIGGER PENDING
Order Response : {"data":{"order_id":"250908100492210"},"status":"success"}
Trading Symbol : NIFTY2590924800CE
Placing Order : {product=MIS, quantity=75, trigger_price=78.0, price=80.0, tradingsymbol=NIFTY2590924800CE, exchange=NFO, validity=DAY, transaction_type=BUY, gtt_params=[[1,-5],[1,5]], order_type=SL, disclosed_quantity=0, market_protection=0.0}
Order Update: 250908100492498 Status: TRIGGER PENDING
Order Response : {"data":{"order_id":"250908100492498"},"status":"success"}
Order Update: 250908100492210 Status: OPEN
Order Update: 250908100492210 Status: COMPLETE
formattedExpiry: 25SEP
fullTradingSymbol: BANKNIFTY25SEP53800CE
token: com.zerodhatech.models.Instrument@3979558c
Placing GTT : {condition={"instrument_token":13984514,"tradingsymbol":"BANKNIFTY25SEP53800CE","trigger_values":[921,1019],"exchange":"NFO","last_price":966}, orders=[{"product":"MIS","quantity":35,"price":921,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"},{"product":"MIS","quantity":35,"price":1019,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
tokenList: [13984514]
gtt id: 286598420
GTT Placed: null
Order Update: 250908100492498 Status: OPEN
Order Update: 250908100492498 Status: COMPLETE
formattedExpiry: 25909
fullTradingSymbol: NIFTY2590924800CE
token: com.zerodhatech.models.Instrument@170cc9e
Placing GTT : {condition={"instrument_token":10388738,"tradingsymbol":"NIFTY2590924800CE","trigger_values":[70,90],"exchange":"NFO","last_price":78.15}, orders=[{"product":"MIS","quantity":75,"price":70,"tradingsymbol":"NIFTY2590924800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"},{"product":"MIS","quantity":75,"price":90,"tradingsymbol":"NIFTY2590924800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
tokenList: [10388738, 13984514]
gtt id: 286599291
GTT Placed: null
Inside percentage based trail
newStop Loss: 970.0 newTarget: 1030.0
Modify GTT Request : {condition={"instrument_token":13984514,"tradingsymbol":"BANKNIFTY25SEP53800CE","trigger_values":[970,1030],"exchange":"NFO","last_price":985.4}, orders=[{"product":"MIS","quantity":35,"price":970,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":35,"price":1030,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
Modify GTT Response : {"data":{"trigger_id":286598420},"status":"success"}
Time : 11:14:11 After Modify GTT Stop Loss: 970.0 Target Price: 1030.0
gtt id: 286598420
Inside percentage based trail
newStop Loss: 80.0 newTarget: 91.0
Modify GTT Request : {condition={"instrument_token":10388738,"tradingsymbol":"NIFTY2590924800CE","trigger_values":[80,91],"exchange":"NFO","last_price":82.8}, orders=[{"product":"MIS","quantity":75,"price":80,"tradingsymbol":"NIFTY2590924800CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":75,"price":91,"tradingsymbol":"NIFTY2590924800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
Modify GTT Response : {"data":{"trigger_id":286599291},"status":"success"}
Time : 11:15:17 After Modify GTT Stop Loss: 80.0 Target Price: 91.0
gtt id: 286599291
GTT ID: 286599291 Status: triggered
Inside Fixed based trail
Modify GTT Request : {condition={"instrument_token":13984514,"tradingsymbol":"BANKNIFTY25SEP53800CE","trigger_values":[1025,1035],"exchange":"NFO","last_price":1027.25}, orders=[{"product":"MIS","quantity":35,"price":1025,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":35,"price":1035,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
Modify Kite Exception GTT Request : {condition={"instrument_token":13984514,"tradingsymbol":"BANKNIFTY25SEP53800CE","trigger_values":[1025,1035],"exchange":"NFO","last_price":1027.25}, orders=[{"product":"MIS","quantity":35,"price":1025,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":35,"price":1035,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
Error in Kite Exception modifying GTT order: null retrying
Inside Fixed based trail
Modify GTT Request : {condition={"instrument_token":13984514,"tradingsymbol":"BANKNIFTY25SEP53800CE","trigger_values":[1030,1040],"exchange":"NFO","last_price":1032.2}, orders=[{"product":"MIS","quantity":35,"price":1030,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":35,"price":1040,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
Modify Kite Exception GTT Request : {condition={"instrument_token":13984514,"tradingsymbol":"BANKNIFTY25SEP53800CE","trigger_values":[1030,1040],"exchange":"NFO","last_price":1032.2}, orders=[{"product":"MIS","quantity":35,"price":1030,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":35,"price":1040,"tradingsymbol":"BANKNIFTY25SEP53800CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
Error in Kite Exception modifying GTT order: null retrying
GTT already placed. Skipping.
GTT ID: 286598420 Status: triggered
Order Update: 250908100606803 Status: COMPLETE
Tagged:
java client api demo account
Modify Trailing Stop
Nivas
September 8
You need to either enable debug logs for javakiteconnect or print the KiteException message and check the reason.
vishalgyadav
September 11
edited September 11
Modify GTT Request : {condition={"instrument_token":13986050,"tradingsymbol":"BANKNIFTY25SEP54200CE","trigger_values":[925,977],"exchange":"NFO","last_price":923.25}, orders=[{"product":"MIS","quantity":35,"price":925,"tradingsymbol":"BANKNIFTY25SEP54200CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":35,"price":977,"tradingsymbol":"BANKNIFTY25SEP54200CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
2025-09-11 12:13:27 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000001b9 32 HEADERS END_HEADERS
2025-09-11 12:13:27 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000001b9 676 DATA END_STREAM
2025-09-11 12:13:27 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 -
Modify Kite Exception GTT Request : {condition={"instrument_token":13986050,"tradingsymbol":"BANKNIFTY25SEP54200CE","trigger_values":[925,977],"exchange":"NFO","last_price":923.25}, orders=[{"product":"MIS","quantity":35,"price":925,"tradingsymbol":"BANKNIFTY25SEP54200CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":35,"price":977,"tradingsymbol":"BANKNIFTY25SEP54200CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
Error in Kite Exception modifying GTT order: null retrying
2025-09-11 12:13:27 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000001bb 32 HEADERS END_HEADERS
2025-09-11 12:13:27 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000001bb 676 DATA END_STREAM
2025-09-11 12:13:27 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 - << 0x000001bb 136 HEADERS END_HEADERS
2025-09-11 12:13:27 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 - << 0x000001bb 158 DATA
2025-09-11 12:13:27 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 - << 0x000001bb 0 DATA END_STREAM
2025-09-11 12:13:27 DEBUG [ReadingThread] o.internal.concurrent.TaskRunner - Q10002 scheduled after 0 µs: OkHttp ConnectionPool
2025-09-11 12:13:27 DEBUG [OkHttp TaskRunner] o.internal.concurrent.TaskRunner - Q10002 starting : OkHttp ConnectionPool
2025-09-11 12:13:27 DEBUG [OkHttp ConnectionPool] o.internal.concurrent.TaskRunner - Q10002 run again after 300 s : OkHttp ConnectionPool
2025-09-11 12:13:27 DEBUG [OkHttp TaskRunner] o.internal.concurrent.TaskRunner - Q10002 finished run in 58 µs: OkHttp ConnectionPool
2025-09-11 12:13:28 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000000e7 26 HEADERS END_STREAM|END_HEADERS
2025-09-11 12:13:28 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 -
image.png
52.7K
sujith
September 11
You don't need to modify code. You can just enable debug logs as shown in this
sample code
.
vishalgyadav
September 12
KiteException.png
205.9K
vishalgyadav
September 12
This is blocking my next set of execution
Sign In
or
Register
to comment.
2025-09-11 12:13:27 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000001b9 32 HEADERS END_HEADERS
2025-09-11 12:13:27 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000001b9 676 DATA END_STREAM
2025-09-11 12:13:27 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 - Modify Kite Exception GTT Request : {condition={"instrument_token":13986050,"tradingsymbol":"BANKNIFTY25SEP54200CE","trigger_values":[925,977],"exchange":"NFO","last_price":923.25}, orders=[{"product":"MIS","quantity":35,"price":925,"tradingsymbol":"BANKNIFTY25SEP54200CE","exchange":"NFO","transaction_type":"SELL","order_type":"SL"},{"product":"MIS","quantity":35,"price":977,"tradingsymbol":"BANKNIFTY25SEP54200CE","exchange":"NFO","transaction_type":"SELL","order_type":"LIMIT"}], type=two-leg}
Error in Kite Exception modifying GTT order: null retrying
2025-09-11 12:13:27 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000001bb 32 HEADERS END_HEADERS
2025-09-11 12:13:27 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000001bb 676 DATA END_STREAM
2025-09-11 12:13:27 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 - << 0x000001bb 136 HEADERS END_HEADERS
2025-09-11 12:13:27 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 - << 0x000001bb 158 DATA
2025-09-11 12:13:27 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 - << 0x000001bb 0 DATA END_STREAM
2025-09-11 12:13:27 DEBUG [ReadingThread] o.internal.concurrent.TaskRunner - Q10002 scheduled after 0 µs: OkHttp ConnectionPool
2025-09-11 12:13:27 DEBUG [OkHttp TaskRunner] o.internal.concurrent.TaskRunner - Q10002 starting : OkHttp ConnectionPool
2025-09-11 12:13:27 DEBUG [OkHttp ConnectionPool] o.internal.concurrent.TaskRunner - Q10002 run again after 300 s : OkHttp ConnectionPool
2025-09-11 12:13:27 DEBUG [OkHttp TaskRunner] o.internal.concurrent.TaskRunner - Q10002 finished run in 58 µs: OkHttp ConnectionPool
2025-09-11 12:13:28 DEBUG [ReadingThread] okhttp3.internal.http2.Http2 - >> 0x000000e7 26 HEADERS END_STREAM|END_HEADERS
2025-09-11 12:13:28 DEBUG [OkHttp api.kite.trade] okhttp3.internal.http2.Http2 -