Blockchain Control Functions

OKX Exchange API Operation

The API operation package of OKX exchange, the related API can be used after initialization, and it needs to be over the wall in mainland China to use

>>> 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