Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returnLatestOrders query param not working for indexer's ListOrders endpoint #1824

Open
dmu1313 opened this issue Jun 30, 2024 · 2 comments
Open
Labels

Comments

@dmu1313
Copy link

dmu1313 commented Jun 30, 2024

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:

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

Copy link

linear bot commented Jun 30, 2024

@davidsblom
Copy link

Also running into this issue. Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants