ice3x加密货币exchanage python api
ice3x的Python项目详细描述
ICE3X Python库
这个ice3x库是一个与ice3x api版本2兼容的python包。
这个包本质上是官方PHP client的端口。
快速启动
ICE3X API有两大类资源,即受保护的资源和未受保护的资源
为了访问受保护的资源,需要在其平台的account management部分下创建一个私钥和公钥。
同步客户端
fromice3x.clients.syncimportIceCubedSyncClientapi_key='public key'secret='private key'client=IceCubedSyncClient(api_key=api_key,secret=secret)client.get_public_trade_list()
异步客户端
from__future__importannotationsfromtwisted.internetimportreactorfromice3x.clients.asynchronousimportIceCubedAsyncClientapi_key='public key'secret='private key'client=IceCubedAsyncClient(api_key=api_key,secret=secret)defprint_data(data:dict)->None:"""prints the json response from an API call"""print(data)d=client.get_public_trade_list()d.addBoth(print_data)reactor.run()
安装
可以从pypi安装库,如下所示。
pip install ice3x
异步客户端是可选的附加客户端,可以按如下方式安装。
pip install ice3x[async]
要在此存储库上安装版本,请执行以下步骤
git clone https://github.com/BradleyKirton/ice3x cd ice3x python -m venv env # virtualenv envsource env/bin/activate pip install . #pip install .[async] for the async client
开发
克隆repo并根据其开发需求安装包。
git clone https://github.com/BradleyKirton/ice3x cd ice3x pipenv install -e .[dev] make test
待办事项
注意这个库仍然处于测试阶段。
- 编写文档