1

我是不是弄错了,还是只能从 bitstamp API 获取最后一分钟或最后一小时的交易?这就是文档所说的

TRANSACTIONS
GET https://www.bitstamp.net/api/transactions/
Params:
    time - time frame for transaction export ("minute" - 1 minute, "hour" - 1 hour). Default: hour.
Returns descending JSON list of transactions. Every transaction (dictionary) contains:
    date - unix timestamp date and time
    tid - transaction id
    price - BTC price
    amount - BTC amount

https://www.bitstamp.net/api/

我想对于完整的交易列表,我必须使用另一个数据提供者,例如bitcoin charts

4

2 回答 2

2

我认为,Bitstamp 确实没有提供获取旧交易的可能性。

我现在将从http://bitcoincharts.com/获取整个历史...

于 2014-03-12T19:12:55.157 回答
1

我也想知道,这是来自 Bitstamp 的回应。虽然我在添加参数时实际上没有获得结果。如果有人设法让它工作,请告诉我如何。谢谢。

您可以使用我们的 API 来接收我们平台上所有交易的完整历史记录。

获取https://www.bitstamp.net/api/transactions/

参数:

offset - skip that many transactions before beginning to return results. Default: 0.

limit - limit result to that many transactions. Default: 100.

sort - sorting by date and time (asc - ascending; desc - descending). Default: desc.

返回交易的降序 JSON 列表。每笔交易(字典)都包含:

date - unix timestamp date and time

tid - transaction id

price - BTC price

amount - BTC amount

如果您将排序设置为 asc(升序),默认情况下您将首先收到 100 个最旧的订单。

然后,您可以使用设置为 100 的偏移量来接收下一组 100 笔交易,并且您可以继续这样做,直到您收到最新的订单为止。

于 2014-04-22T18:37:34.240 回答