You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kite API because of some poor decision doesn't like i[0]=s&i[1]=d so the API decided to strip the array part of it and make it i=s&i=d which is VERY WRONG.
It tries to do the same for GTT trigger thinking it's an index key.
This is an example request
https://pastebin.com/raw/6NKK1C9q
You see the library is stripping the part containing
[40]
.The exact line with the issues are:
https://github.com/zerodhatech/phpkiteconnect/blob/master/kiteconnect.php#L1185 https://github.com/zerodhatech/phpkiteconnect/blob/master/kiteconnect.php#L1124
It replaces
[40]
by ``. I don't know why this line of code was added but it should be smarter and not delete the important data.https://kite.trade/forum/discussion/comment/27316
Update: I seem to have find why it was added.
D:\www\trading\kite\kiteconnect.php:1190:
array (size=1)
'i' =>
array (size=2)
0 => string 'NSE:ICICIBANK' (length=13)
1 => string 'NSE:RELIANCE' (length=12)
D:\www\trading\kite\kiteconnect.php:1191:string 'i%5B0%5D=NSE%3AICICIBANK&i%5B1%5D=NSE%3ARELIANCE' (length=48)
D:\www\trading\kite\kiteconnect.php:1193:string 'i=NSE%3AICICIBANK&i=NSE%3ARELIANCE' (length=34)
Kite API because of some poor decision doesn't like
i[0]=s&i[1]=d
so the API decided to strip the array part of it and make iti=s&i=d
which is VERY WRONG.It tries to do the same for GTT trigger thinking it's an index key.
D:\www\trading\kite\kiteconnect.php:1190:
array (size=4)
'condition' => string '{"exchange":"BSE","tradingsymbol":"RCOM","trigger_values":[40],"last_price":0}' (length=78)
'orders' => string '[{"transaction_type":"SELL","order_type":"LIMIT","product":"CNC","quantity":8500,"price":0,"exchange":"BSE","tradingsymbol":"RCOM"}]' (length=132)
'type' => string 'single' (length=6)
'trigger_id' => int 8760636
D:\www\trading\kite\kiteconnect.php:1191:string 'condition=%7B%22exchange%22%3A%22BSE%22%2C%22tradingsymbol%22%3A%22RCOM%22%2C%22trigger_values%22%3A%5B40%5D%2C%22last_price%22%3A0%7D&orders=%5B%7B%22transaction_type%22%3A%22SELL%22%2C%22order_type%22%3A%22LIMIT%22%2C%22product%22%3A%22CNC%22%2C%22quantity%22%3A8500%2C%22price%22%3A0%2C%22exchange%22%3A%22BSE%22%2C%22tradingsymbol%22%3A%22RCOM%22%7D%5D&type=single&trigger_id=8760636' (length=387)
D:\www\trading\kite\kiteconnect.php:1193:string 'condition=%7B%22exchange%22%3A%22BSE%22%2C%22tradingsymbol%22%3A%22RCOM%22%2C%22trigger_values%22%3A%2C%22last_price%22%3A0%7D&orders=%5B%7B%22transaction_type%22%3A%22SELL%22%2C%22order_type%22%3A%22LIMIT%22%2C%22product%22%3A%22CNC%22%2C%22quantity%22%3A8500%2C%22price%22%3A0%2C%22exchange%22%3A%22BSE%22%2C%22tradingsymbol%22%3A%22RCOM%22%7D%5D&type=single&trigger_id=8760636' (length=379)
Pretty dumb.
@vividvilla
@knadh
The text was updated successfully, but these errors were encountered: