Route not found while modifying the order

Srini
Hi, I am receiving route not found error while modifying the oreder... below is my code, could you please let me know what is going wrong here?

kite.modify_order(variety = Order_Variety, order_id=Order_ID, price=Price)

Order_Variety= kite.VARIETY_regular / "VARIETY_regular" (tried both)
order_id= 210202202302037 (verified order is still open)
price=16.2

I am fetching the details from kite.orders() at runtime....... sample code below.

Orders = kite.orders()

Order_ID = Orders[x]['order_id']
if Order_State == "OPEN":
Order_Symbol = Orders[x]["exchange"]+":" + Orders[x]["tradingsymbol"]
Order_Type = Orders[x]["transaction_type"]
Order_Variety = "kite.VARIETY_"+Orders[x]["variety"]
  • Srini
    Hello, could anyone look into this
  • sujith
    Are you trying this immediately after placing an order?
  • Srini
    I have tried multiple times, it did not work even after 30 mins.
  • Srini
    but is it a limitation?
  • Srini
    would it always take 1 and half hour to reply....?
  • rakeshr
    @Srini
    Order_Variety= kite.VARIETY_regular / "VARIETY_regular" (tried both)
    It should be kite.VARIETY_REGULAR. Check constant assignment here.
  • Srini
    Hi Rakesh, thank you. will give it a try tomorrow.

    below code returns kite.VARIETY_regular as variety, since I fetch it in runtime I will not be sure of order variety, is there a better way to deal this? if this is a inconsistency it defeats the whole purpose of automation / using API.

    Orders = kite.orders() >> Order_Variety = "kite.VARIETY_"+Orders[x]["variety"]



Sign In or Register to comment.