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.
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
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.
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.