首页 > 解决方案 > Coinbase Pro 中的限价单

问题描述

我尝试下单后限价单,这样就不会产生任何费用,以下是相关声明:

from coinbase.wallet.client import Client

spot_price = client.get_spot_price(currency_pair = 'BTC-USD')

priceStr = repr(float(spot_price.amount) - 25.0)
buy_order = primary_account.buy(amount = '0.001', currency = 'BTC', price = priceStr, post_only = True )
print("buy_order=", buy_order, "price=", priceStr)

However, it did not work as a fee of 0.99 is charged and also the price is higher.  

What could be wrong?

好的,现在我意识到问题可能是我使用的是 Coinbase API 密钥,而不是 Coinbase.Pro(以前是 GDAX)API 密钥。我已生成 Pro API 密钥并将在明天重试(因为似乎明天将发生更改)。感谢所有试图提供帮助的人。

谢谢,肖恩

标签: pythoncoinbase-apifee

解决方案


推荐阅读