All
篩選條件:
我該如何將現金存入我的帳戶當中?
我需要帳戶驗證方面的幫助
為甚麼我無法訪問我的帳戶?
提取加密貨幣會產生任何費用嗎?
我需要協助登錄我的帳戶
REST API TradesHistory 端點可用於檢索您帳戶的完整交易歷史記錄。
TradesHistory 端點每次請求最多返回 50 筆交易,以倒序時間順序(最新交易優先),並提供分頁偏移參數 (ofs) 以檢索後續每組(頁)最多 50 筆交易。
例如,在沒有偏移參數或偏移量為零 (ofs=0) 的情況下呼叫 TradesHistory 端點,將會返回您帳戶最近的 50 筆交易,而在偏移量為 50 (ofs=50) 的情況下呼叫 TradesHistory,則會返回下一組 50 筆交易(第 51 至第 100 筆交易)。
#!/usr/bin/env python3
# pretty-print the TradesHistory using offset parameter for more than 50 records
import sys
import pprint
import krakenex
import time
k = krakenex.API()
k.load_key('kraken.key')
iterations = 0
offSet = 0
while True:
iterations +=1
try:
response = k.query_private('TradesHistory', {'ofs': offSet})
pprint.pprint(response)
count = response['result']['count']
print(count)
offSet += 50
time.sleep(2)
print(offSet)
if (offSet >= 400):
print("API offset count is 400 or more")
print("We made {0} Calls to the API".format(iterations))
raise SystemExit
except:
raise SystemExit