Coinbase Pro 'before' query no work?

Why does the Coinbase Pro API request below, to receive trades using ‘before’ query, not work?

https://api.exchange.coinbase.com/products/BTC-EUR/trades?before=5&limit=2"

Before means greater than the specified trade id. After means less than the specified trade id. The API will return the newest trades that fit the query parameters.

Hi @mamba76, welcome to the forum!

@ttno1 is correct, the page before is a newer page and not one that happened before in chronological time and the page after is an older page and not one that happened after this one in chronological time. To know more, you can go through this documentation: Pagination.

We have also tried the endpoint on our end, and it seems to be working fine. If you are encountering an error, please let us know.

We hope this helps.

1 Like