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 权限:读取 限频值(NEW):5次/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)