区块链模块

OKX交易所API

OKX交易所的API,初始化后即可使用,中国大陆需要翻墙使用

>>> from pyhutool.blockchain.exchange.okx import restV5 as okx
>>> OKX = okx.okxApiV5('api_key', 'secret_key', 'passphrase', test=1)

>>> OKX.accountGetBalance() # get balance
>>> OKX.accountGetPosition() # get position
>>> OKX.accountPositionRisk() # get position risk
>>> OKX.accountGetBills() # get bills