我想从输出中提取volume和last price的值到其他变量中,但我无法获取它们
结果如下
DEBUG:root:[{'timestamp': datetime.datetime(2018, 7, 24, 12, 23, 34), 'last_price': 90.35, 'oi_day_low': 37008, 'volume': 23308, 'sell_quantity': 6035, 'last_quantity': 2, 'change': -0.17126125628418445, 'oi': 43808, 'average_price': 90.3275363, 'ohlc': {'high': 90.43, 'close': 90.505, 'open': 90.3125, 'low': 90.28}
def on_ticks(ws, ticks):
# Callback to receive ticks.
logging.debug("{}".format(ticks))
通过使用这个,它为我工作
相关问题 更多 >
编程相关推荐