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.
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/#c5034eb6d0
资产划转
API Key 权限:交易
该节点为母用户和子用户进行资产划转的通用接口。
母用户和子用户均支持的功能包括:
1、币币账户与逐仓杠杠账户之间的划转;
2、逐仓杠杠不同账户间相同币种的直接划转, 如逐仓杠杠BTC/USDT账户和ETH/USDT账户, 相同币种USDT可直接划转;
仅母用户支持的功能包括:
1、母用户币币账户与子用户币币账户间的划转;
2、不同子用户币币账户间划转;
仅子用户支持的功能包括:
1、子用户币币账户向母用户下的其他子用户币币账户划转, 此权限默认关闭, 需母用户授权。授权接口为 POST /v2/sub-user/transferability;
2、子用户币币账户向母用户币币账户划转;
其他划转功能将逐步上线,敬请期待。
'''
class PostAccountTransferService :
def __init__ ( self , params ) :
self . params = params
def request ( self , * * kwargs ) :
channel = " /v1/account/transfer "
def parse ( dict_data ) :
data = dict_data . get ( " data " , { } )
return default_parse ( data , AccountTransferResult , [ ] )
return RestApiSyncClient ( * * kwargs ) . request_process ( HttpMethod . POST_SIGN , channel , self . params , parse )