sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.98k stars 2.2k forks source link

Error: "Signature for this request is not valid" when placing a futures orders from Heroku #1188

Open gtellezgiron opened 2 years ago

gtellezgiron commented 2 years ago

Please help!!!

I am trying to place a futures order that is triggered by a webhook in Tradingview and sent to Binance from a Heroku server. Everything works fine when I send the webhook from my local Mac via Insomnia, however if Tradingview triggers the webhook I get a "Signature for this request is not valid error.". So, 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 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 tried checking server time and local time, and theres no problem there, and I have also regenerated API keys and secret multiple times, but nothing seems to work.

Any ideas where the problem might be?

I will appreciate very much any help because I have run out of ideas!!!!