You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there is a problem with the returnLatestOrders query param in the listOrders endpoint. If you test on any address, you'll see that it returns the same results regardless of whether you use "true" or "false". This seems like a bug unless I am misunderstanding how it's supposed to work.
Here are some examples from a random address with trading activity:
You can see that the responses from these requests are identical. They should be sorted in reverse order. The queries above use limit=100. If an address has fewer than 100 orders returned, you can just reduce the limit to something like limit=1, and you'll see that it still returns the same response even though one query should return the oldest order and the other query should return the newest order.
Another example: the below query has returnLatestOrders set to true but does not specify the market. The response contains some of the old orders in the above queries, but it does not contain some of the new orders in the above queries. It should be the other way around.
I believe there is a problem with the
returnLatestOrders
query param in thelistOrders
endpoint. If you test on any address, you'll see that it returns the same results regardless of whether you use "true" or "false". This seems like a bug unless I am misunderstanding how it's supposed to work.Here are some examples from a random address with trading activity:
dydx1c8dhfxzh69gqnw7g7sn02v60muv2ek6s2grym8
SOL-USD, returnLatestOrders=true
https://indexer.dydx.trade/v4/orders?address=dydx1c8dhfxzh69gqnw7g7sn02v60muv2ek6s2grym8&subaccountNumber=0&ticker=SOL-USD&tickerType=PERPETUAL&limit=100&returnLatestOrders=true
SOL-USD, returnLatestOrders=false
https://indexer.dydx.trade/v4/orders?address=dydx1c8dhfxzh69gqnw7g7sn02v60muv2ek6s2grym8&subaccountNumber=0&ticker=SOL-USD&tickerType=PERPETUAL&limit=100&returnLatestOrders=false
You can see that the responses from these requests are identical. They should be sorted in reverse order. The queries above use limit=100. If an address has fewer than 100 orders returned, you can just reduce the limit to something like limit=1, and you'll see that it still returns the same response even though one query should return the oldest order and the other query should return the newest order.
Another example: the below query has returnLatestOrders set to true but does not specify the market. The response contains some of the old orders in the above queries, but it does not contain some of the new orders in the above queries. It should be the other way around.
all markets, returnLatestOrders=true
https://indexer.dydx.trade/v4/orders?address=dydx1c8dhfxzh69gqnw7g7sn02v60muv2ek6s2grym8&subaccountNumber=0&tickerType=PERPETUAL&limit=100&returnLatestOrders=true
The text was updated successfully, but these errors were encountered: