Adnvanced Trade - Paginated Requests' Inconsistency

Hi there,

I’ve noticed that the List Products request has a different pagination approach than other portions of the API. List Products uses limit and offset, while List Accounts uses a limit and a cursor with has_next. Since some functionality relies on Sign in With Coinbase API, which uses yet another method of pagination (see List Accounts in the Sign in With API for example), is there a plan to unify the Advanced Trade API pagination?

As a developer/client, it makes things easier when there is a common approach for obvious reasons. :smile:

Thanks in advance!

Any update/comment about this?

Also testing right now I noticed that sometimes limit is ignored and all products are returned!: https://api.coinbase.com/api/v3/brokerage/products?limit=100

2 Likes

Hey @kadengriffith! Thank you for the feedbacks and apologies for the delay. We understand the importance of having a unified approach to pagination and are actively working on making sure that all endpoints in the Advanced Trade API use the same pagination approach. We appreciate your feedback and will keep you updated on any changes.

Hey @muktupavels! Thanks for sharing this with us, we will reach out to you with an update regarding this. Till then, please keep in touch.

It’s still sometimes ignored. For example when I communicate with:

https://api.coinbase.com/api/v3/brokerage/products?product_type=SPOT&limit=2

Sometimes the limit is ignored and it responds with all 700+ trading pairs and sometimes it is not ignored and it only provides 2. This makes me seriously question if we can trust the Coinbase API to do anything right, if it randomly ignores or does not ignore parameters you sent it even for a simple request like this. Unless it is by design that it may or may not actually honor the requested limit.

Hey @kadengriffith @muktupavels! Thank you for your patience. Please be informed that All GET endpoints which return an object list support cursor based pagination with pagination information inside a pagination object. While using cursor based pagination might seem weird compared to many APIs it protects from the situation when the resulting object list changes during pagination (new resource gets added or removed). For the unification part, it does not seem that the team has any plans yet. However in case there are any updates we will keep you posted about it. We hope this helps. Do let us know in case you have any questions or concerns.

Does not work with https://docs.cloud.coinbase.com/advanced-trade-api/reference/retailbrokerageapi_getproducts. Limit parameter now is completely ignored and all products are returned without pagination information.

Just came to make an issue about this. Can confirm both Limit and Offset for /Products are ignored. Testing others now

@muktupavels @TrevorJudice Thank you for pointing it out. We are looking into it. We appreciate your patience in this matter. Please keep in touch.

I am now encountering these facts that cursor parameter is being ignored and I always get the first page of data with has_next true as well - creating infinite looping :slight_smile:
Is there any update on this at all ?

List Products endpoint does not have cursor and has_next! But that endpoint does have problem: