I am trying to close position (single and all) using endpoint https://api.fyers.in/api/v2/positions, All of sudden its stopped working giving error Please provide id. Its was working fine some time ago.
Any idea why?
I am trying to close position (single and all) using endpoint https://api.fyers.in/api/v2/positions, All of sudden its stopped working giving error Please provide id. Its was working fine some time ago.
Any idea why?
Can you post your request body and client ID so we can check on our end
Also, just an FYI
for exiting all positions the body should be {}
For exiting specific positions the body should be {“id”: “NSE:PNB-EQ-INTRADAY”}
My client id : XR14876
I am passing request body as mentioned docs :
For all : []
For multiple positions : [{“id” : “ID1”}, {“id” : “ID2”}]
This is an invalid input
If you can look through the docs
https://myapi.fyers.in/docs/#tag/Other-Transactions/paths/~1OtherTransactions/patch
Ideally you should be making 2 api call’s
first call {“id”: “ID1”}
second call {“id”: “ID2”}
The api does not accept a list []
Ok, I will update my code. Please also update your Sample Request section it has list as example.
**[{
“id”:orderId
},
{
“id”:orderId
}]
**