All
필터링 기준:
현금을 내 계정으로 입금하려면 어떻게 하나요?
계정 인증에 대한 도움이 필요합니다
왜 내 계정에 접근할 수 없나요?
암호화폐 출금 수수료가 있나요?
계정에 로그인하는 데 도움이 필요합니다
REST API TradesHistory 엔드포인트를 사용하여 계정의 전체 거래 내역을 검색할 수 있습니다.
TradesHistory 엔드포인트는 요청당 최대 50개의 거래를 역순(가장 최근 거래부터)으로 반환하며, 다음 그룹(페이지)의 최대 50개 거래를 검색하기 위한 페이지네이션 오프셋 파라미터(ofs)를 제공합니다.
예를 들어, 오프셋 파라미터 없이 또는 오프셋을 0(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