Kraken API的解说文档不知道是谁写的,大概和国内大学的高数教材的编写者师承一家。所以这里我给自己解释一下:
文档里是这么写的:
Get OHLC data
URL:
https://api.kraken.com/0/public/OHLCInput:
pair = asset pair to get OHLC data for
interval = time frame interval in minutes (optional):1 (default), 5, 15, 30, 60, 240, 1440, 10080, 21600
since = return committed OHLC data since given id (optional. exclusive)
Result: array of pair name and OHLC data
<pair_name> = pair name array of array entries(<time>, <open>, <high>, <low>, <close>, <vwap>, <volume>, <count>)last = id to be used as since when polling for new, committed OHLC data
Note: the last entry in the OHLC array is for the current, not-yet-committed frame and will always be present, regardless of the value of "since".
问:你如何用他?
答:当然是往后端送东西啊,就是html的用法呗。幸亏去年在三亚工作了一阵。
https://api.kraken.com/0/public/OHLC?pair=XETHZUSD&interval=15&since=0这样得到数据。
(这个贴更新过数次,因为刚才犯了个智障错误……第二个参数以后不用?啊只要&号就可以了。我还以为Kraken不肯提供太久的历史数据……扶额。我的前端基本功……)