python - 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 密钥并将在明天重试(因为似乎明天将发生更改)。感谢所有试图提供帮助的人。
谢谢,肖恩
解决方案
推荐阅读
- reactjs - 状态未显示在 Redux 商店中
- c++ - 在 C++ 中,数组分配的 new 和 new[] 有什么区别
- ruby-on-rails - MiniTest::Assertion: StandardError 预期但没有引发
- python - 如何实时获取绘图数据?
- c++ - constexpr 静态成员指针使用 gcc 和 clang 编译,但不使用 MSVC
- python-3.x - 使用属性文件的 F 字符串和插值
- python - 通过 Anaconda 打开 Spyder 的问题
- excel - 使用 workbook_sheetchange 事件在行范围内使数值为负
- twilio - 如何通过使用状态回调 twilio 获取到组合的链接
- node.js - Mongoose:迭代记录以更新给定数组中的日期值的有效方法?