Python_Huobi API帐户类型,此参数是什么? - python

火币的加密货币交换API:https://github.com/huobiapi/huobi_Python
询问Account type,您通常会在Accounttype.spot()上看到它

我不知道这意味着什么,在文档中或互联网上的任何地方都没有您知道的线索吗?我需要下订单

参考方案

您可以通过SubscriptionClient获取帐户类型。根据我的试验,有两种主要类型,分别是spotpoint

spot帐户是指Huobi提供的所有可用加密货币,而point帐户代表Huobi自己的要点-hbpoint可以兑换成美元,反之亦然。也请在另一篇文章中找到我的答案。
"Account" object has no atribute get Huobi_python API

以下代码的原始来源是

https://github.com/HuobiRDCenter/huobi_Python/blob/master/example/websocket/reqsignaccountlist.py

from huobi import SubscriptionClient
from huobi.constant.test import *
from huobi.model import *

sub_client = SubscriptionClient(api_key="",
                                secret_key="")

def Accountinfo(account_event: 'AccountEvent'):
        global acc
        for account in account_event.account_list:
            if account.balances:  
                account.id
                account.account_type
                account.account_state
                if account.account_type == 'spot':
                        acc = str(account.account_type)
                        print("Account type is: " + str(acc))

sub_client.request_account_balance_event(Accountinfo)

注意:在global acc功能中设置Accountinfo是为了使局部变量-acc成为全局变量。因此,acc可用于布尔运算。

Python sqlite3数据库已锁定 - python

我在Windows上使用Python 3和sqlite3。我正在开发一个使用数据库存储联系人的小型应用程序。我注意到,如果应用程序被强制关闭(通过错误或通过任务管理器结束),则会收到sqlite3错误(sqlite3.OperationalError:数据库已锁定)。我想这是因为在应用程序关闭之前,我没有正确关闭数据库连接。我已经试过了: connectio…

Python pytz时区函数返回的时区为9分钟 - python

由于某些原因,我无法从以下代码中找出原因:>>> from pytz import timezone >>> timezone('America/Chicago') 我得到:<DstTzInfo 'America/Chicago' LMT-1 day, 18:09:00 STD…

用大写字母拆分字符串,但忽略AAA Python Regex - python

我的正则表达式:vendor = "MyNameIsJoe. I'mWorkerInAAAinc." ven = re.split(r'(?<=[a-z])[A-Z]|[A-Z](?=[a-z])', vendor) 以大写字母分割字符串,例如:'我的名字是乔。 I'mWorkerInAAAinc”变成…

如何打印浮点数的全精度[Python] - python

我编写了以下函数,其中传递了x,y的值:def check(x, y): print(type(x)) print(type(y)) print(x) print(y) if x == y: print "Yes" 现在当我打电话check(1.00000000000000001, 1.0000000000000002)它正在打印:<…

Python:如何根据另一列元素明智地查找一列中的空单元格计数? - python

df = pd.DataFrame({'user': ['Bob', 'Jane', 'Alice','Jane', 'Alice','Bob', 'Alice'], 'income…