“此请求的签名无效”使用Python-Binance库将期货订单订购时错误

发布于 2025-01-30 13:00:33 字数 775 浏览 4 评论 0原文

我正在尝试使用Heroku服务器的Python-Binance库以Binance下达期货订单,该库是由TradingView中的Webhook触发的。当Webhook通过失眠从我的本地Mac触发时,一切正常,但是,如果TradingView触发Webhook,我将获得“此请求的签名是无效的错误”。仅当Heroku服务器试图将订单订购时,由于来自TradingView的Webhook而不是来自我的本地MAC,才会发生错误。

            order = client_Binance.futures_create_order(
                symbol="BTCUSDT",
                side="BUY",
                type="LIMIT",
                timeInForce="GTC",
                quantity="0.029",
                price="28000.0",
                recvWindow=6000000,
                newClientOrderId = "LongTrd 1C5BTC2L",
                timestamp = 1653043804435
            )

我已经检查了服务器与当地时间之间的关系,那里似乎没有问题,而且我也多次再生API和秘密键,但似乎没有任何作用。

我已经研究了这个主题,但我还没有找到解决方案,因此我将非常感谢任何帮助,因为我已经用完了想法!!!!

谢谢!!

I am trying to place a futures order in Binance, using the python-binance library, from a Heroku Server, which is triggered by a webhook in Tradingview. Everything works fine when the webhook is triggered from my local Mac via Insomnia, however if Tradingview triggers the webhook I get a "Signature for this request is not valid error.". The error only occurs when the Heroku server tries to place the order in Binance, as a result of a webhook coming from Tradingview, and not from my local Mac.

            order = client_Binance.futures_create_order(
                symbol="BTCUSDT",
                side="BUY",
                type="LIMIT",
                timeInForce="GTC",
                quantity="0.029",
                price="28000.0",
                recvWindow=6000000,
                newClientOrderId = "LongTrd 1C5BTC2L",
                timestamp = 1653043804435
            )

I have checked the relationship between server and local time, and there seems to be no problem there, and I have also regenerated API and secret keys multiple times, but nothing seems to work.

I have researched the topic, and I have not found a solution, so I will appreciate very much any help because I have run out of ideas!!!!

Thanks!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文