Closed traveller1011 closed 1 year ago
And the orderspec looks like ?
It looks like you try to query for an order that already is executed and therefore you get a NO_SUCH_ORDER response
But retrying should consistently give that response.
So, please show the code and orderspec, otherwise it is all guess work.
Feit,
Writing an issue as I am not sure where to scope a general question (and you answered me before in this format).
I am running into an issue and I wonder if you have any comment. I am actually directly tapping Oanda Endpoint directly in this case (so technically this library is not involved, but i suspect you will know the answer regardless)
The issue is...
I place a market order by submitting a POST request to this endpoint:
/v3/accounts/<OANDA_ACCOUNT_ID>/orders
.I get a successful response, including the oanda_id's for the newly created Order and Trade.
Moments later, i query this endpoint
/v3/accounts/<OANDA_ACCOUNT_ID>/orders/<OANDA_ORDER_ID>
(or the Trade one) and pass the oanda ID i got back from the oanda response.For a brief period of time - maybe 0.25-0.50 seconds, i get back this response
{'lastTransactionID': '1168', 'errorMessage': 'The order ID specified does not exist', 'errorCode': 'NO_SUCH_ORDER'}
......After retrying a few times, the error goes away and I get a clean response.
Is it normal to have to use exponential backoff approach--- is this something you contended with building the oanda-api-v20 package?
Any insights greatly appreciated,
Mark