client.get_spot_price(currency='EUR')这条线将给我当前的比特币价格,但我如何找到莱辛和以太价格?
发布于 2017-08-16 18:43:02
您需要传递正确的currency_pair,如文档中所示
client.get_spot_price(currency_pair='LTC-EUR')编辑
这似乎是github上注意到的一个错误。要快速修复,可以通过查询此函数来修改client.py文件。
def get_spot_price(self, **params):
"""https://developers.coinbase.com/api/v2#get-spot-price"""
response = self._get('v2', 'prices','spot', data=params)
return self._make_api_object(response, APIObject)到这个
def get_spot_price(self, **params):
"""https://developers.coinbase.com/api/v2#get-spot-price"""
currency_pair = params['currency_pair']
response = self._get('v2', 'prices', currency_pair,'spot', data=params)
return self._make_api_object(response, APIObject)https://stackoverflow.com/questions/45720620
复制相似问题