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.

37 lines
1.1 KiB

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/#84f1b5486d
财务流水
API Key 权限:读取
该节点基于用户账户ID返回财务流水。
一期上线暂时仅支持划转流水的查询“transactType” = “transfer”
通过“startTime”/“endTime”框定的查询窗口最大为10天意即通过单次查询可检索的范围最大为10天。
该查询窗口可在最近180天范围内平移意即通过多次平移窗口查询最多可检索到过往180天的记录。
'''
class GetAccountLedgerService:
def __init__(self, params):
self.params = params
def request(self, **kwargs):
channel = "/v2/account/ledger"
def parse(dict_data):
data_list = dict_data.get("data", [])
return default_parse_list_dict(data_list, AccountLedger, [])
return RestApiSyncClient(**kwargs).request_process(HttpMethod.GET_SIGN, channel, self.params, parse)