You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
920 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

from huobi.connection.restapi_sync_client import RestApiSyncClient
from huobi.constant.system import HttpMethod
from huobi.model.account import *
from huobi.utils import *
'''
https://huobiapi.github.io/docs/spot/v1/cn/#0d3c2e7382
账户流水
API Key 权限:读取
限频值NEW5次/2s
该节点基于用户账户ID返回账户流水。
'''
class GetAccountHistoryService:
def __init__(self, params):
self.params = params
def request(self, **kwargs):
channel = "/v1/account/history"
def parse(dict_data):
response = dict()
data_list = dict_data.get("data", [])
response['data'] = default_parse_list_dict(data_list, AccountHistory, [])
response['next_id'] = dict_data.get("next-id", 0)
return response
return RestApiSyncClient(**kwargs).request_process(HttpMethod.GET_SIGN, channel, self.params, parse)