Kotak-Neo / kotak-neo-api

106 stars 92 forks source link

not able to cancel orders via api #202

Open sandeepbhutani304 opened 1 month ago

sandeepbhutani304 commented 1 month ago

When I am trying to cancel order like this

client.cancel_order(order_id = "240711001164xxx")

I am getting error:

Sorry, the requested action (Cancel, Modify, or View Order History) is only available for orders placed via our API. 
Please use the website or mobile app for orders placed through those platforms.

I want to close all open orders in a loop, be it created by API or by app.. what to do?

crypt0inf0 commented 1 month ago

Only orders placed via API can be cancelled by API. Orders placed via web/app can not be cancelled via API.

sandeepbhutani304 commented 1 month ago

May I know the reason for this restriction?

crypt0inf0 commented 1 month ago

That's how neo API works, Unless they make some changes on the neo end. There is no reason.