Asyncio Cryptocurrency Prices Library
aiocrypto-prices的Python项目详细描述
#aiocrypto_价格
很早的版本-API会改变!
如果你碰巧发现这个图书馆,请提供任何和所有的反馈 通过任何对你舒适的方式。
##安装
$pipenv安装aiocrypto_价格
或
$pip安装aiocrypto_价格–用户
##用法
在幕后我们(目前)正在使用CryptoCompare的API, 这意味着所有的符号都需要有它们的格式和支持 由他们。
###简单
`python >> from aiocrypto_prices import currencies >> await currencies.ETH.prices.get('USD') 1053.28 `
###高级
对并行加载有用。
小心,如果您没有通过get访问目标价格, 缓存过期后可能无法重新加载 `python >> from aiocrypto_prices import currencies >> currencies.add('BTC', 'ETH', 'IOT') >> await currencies.load_all() >> currencies.IOT.prices.USD 2.79 `
###设置其他选项
`python >>> from aiocrypto_prices import currencies >>> currencies.cache = 120 # 2 minute cache >>> currencies.target_currencies.append('EUR') # In addition to defaults, let's fetch EUR too. >>> currencies.extra_information = True # Get name and url of a logo `
或
`python >>> from aiocrypto_prices import Currencies >>> currencies = Currencies(cache=120, target_currencies=['USD','EUR'], extra_information=True) `
##更改日志
###0.0.3
- extra_information参数已重命名为human
- 新参数'full'提供市值和供应量
- 更多数据应提供“完整”,但需要重新设计价格类别
##待办事项
- 所有的任务都分散在代码中
- CryptoCompare提供的所有可用信息
- 指定该货币的金额?-也许是对开本?
- 实现将同一符号的货币和其他可能的交互相加
- aiocrypto_交易所
- aiocrypto_池