Coinbase Pro 交易 api 之前和之后是什么意思

What do before and after in Coinbase Pro trades api mean

有谁知道Coinbase Pro的交易api(url here)中的beforeafter分别对应什么?我试过 linux 个纪元,但没有用。

老实说,我自动假设 beforeafter 参数是像您一样的纪元时间戳。通过 exchange/cloud docs 回读后,我意识到它实际上是一种合并 游标分页 向 Coinbase API 发送 REST API 请求的方法 API.

游标分页是一次一个块地浏览大量有序数据的最有效方法。当您考虑 Coinbase 拥有多少 real-time 个数据点和历史数据点时,您就可以理解为什么您只想获得在任何给定时间与您或用户相关的少量数据。

这是 docs 在使用他们的 API 时关于分页的说法:

Coinbase Exchange uses cursor pagination for all REST requests which return arrays.

Cursor pagination allows for fetching results before and after the current page of results and is well suited for realtime data. Endpoints like /trades, /fills, /orders, return the latest items by default. To retrieve more results subsequent requests should specify which direction to paginate based on the data previously returned.

我建议您快速浏览一下 the docs that is dedicated to cursor pagination 中的页面。它对一个有点复杂的主题提供了简明的解释。