It looks like you're new here. If you want to get involved, click one of these buttons!
kite.order_modify(order_id=row['order_id'],tradingsymbol=row['tradingsymbol'],exchange=row['exchange'],transaction_type='BUY',order_type='SL-M',quantity=row['quantity'], product=row['product'], trigger_price=row['sl_price_new'])
Could you please advise where could the problem be?
160621000057099,SBIN,NSE,BUY,480,SL-M,CO,217.95
160621000057344,ZEEL,NSE,BUY,229,SL-M,CO,456.1
160621000057553,BPCL,NSE,BUY,103,SL-M,CO,1013.2
160621000057731,COALINDIA,NSE,BUY,331,SL-M,CO,315.7
160621000058059,UPL,NSE,BUY,182,SL-M,CO,573.65
160621000058259,AUROPHARMA,NSE,BUY,140,SL-M,CO,745.35
Any help on this please? Even though I pass on all the required parameters - the exception message is "'Cannot Modify a Cover Order.'"
The order_ids correspond to 21-June trade and were tried around 10-11 am.
variety='co'
parameter.variety='co'
parameter, I am getting the error as:'Not a second Legged Cover Order.'
my order_modify call now looks like:
kite.order_modify(order_id=row['order_id']),tradingsymbol=row['tradingsymbol'],exchange=row['exchange'],transaction_type='BUY',order_type='SL-M',quantity=row['quantity'],product=row['product'], trigger_price=row['sl_price_new'], variety='co' )
Exmaple:
160623000046137,LICHSGFIN,NSE,BUY,213,SL-M,CO,491.2,co
160623000046409,BANKBARODA,NSE,BUY,695,SL-M,CO,150.75,co
Am I sending anything wrong in order_type or product?
order_id
andtrigger_price
should be passed. Isn't it?I tried the following call:
kite.order_modify(order_id=row['order_id']),trigger_price=row['sl_price_new'], variety='co' )
Still failing with error:
'Not a second Legged Cover Order.'
Nevermind - the last bit of code works. The order_id value wasn't correct. Passing
variety='co'
solved the issue.Suggestion: can the python document be updated to explain the mandatory parameters and their values? Seeing the code it seems to be understandable but it will help developers.