如何使用CCXT在BYBIT上进行现货市场秩序?
我正在使用CCXT库与Exchange一起工作。努力在Bybit上进行市场订单。如何修复? 我遇到的错误是TypeError:exchange.request()从1到3个位置参数,但给出了5个
bybit_spot = ccxt.bybit({
"apiKey": config.bybit_API_KEY,
"secret": config.bybit_SECRET_KEY,
"options": {'defaultType': 'spot' }})
bybit_spot.private_post_spot_v1_order("GMTUSDT", "buy", "market", amount)
I am using ccxt library to work with exchange. Struggling with making market order on Bybit. How it can be fixed?
The error i've got is TypeError: Exchange.request() takes from 1 to 3 positional arguments but 5 were given
bybit_spot = ccxt.bybit({
"apiKey": config.bybit_API_KEY,
"secret": config.bybit_SECRET_KEY,
"options": {'defaultType': 'spot' }})
bybit_spot.private_post_spot_v1_order("GMTUSDT", "buy", "market", amount)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您从哪里获得
private_post_spot_v1_order
从哪里获取?据我所知,这似乎不是CCXT方法。订单的正确方法是createorder
,如手动。这是一个具有binance的工作示例,但是Bybit应该是相同的:
让我知道它是否不起作用,我将与Bybit开设一个帐户以在此处测试它。
Where are you getting
private_post_spot_v1_order
method from? It doesn't seem to be a ccxt method as far as I can see. The correct method for place an order iscreateOrder
as defined in the manual.Here is a working example with binance but it should be the same for bybit:
Let me know if it doesn't work and I will open an account with bybit to test it there.
希望这可以有所帮助:
Hope this could help: