trawl_poloniex.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:core 作者: IntelligentTrading 项目源码 文件源码
def pull_poloniex_data():
    try:
        logger.info("pulling Poloniex data...")
        req = get('https://poloniex.com/public?command=returnTicker')

        data = req.json()
        timestamp = time.time()

        poloniex_data_point = ExchangeData.objects.create(
            source=POLONIEX,
            data=json.dumps(data),
            timestamp=timestamp
        )
        logger.info("Saving Poloniex price, volume data...")
        _save_prices_and_volumes(data, timestamp)


    except RequestException:
        return 'Error to collect data from Poloniex'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号