python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

Signature for this request is not valid

Open Pouya10 opened this issue 2 years ago • 1 comments

Hello, I use these codes: (python)

client.futures_cancel_orders(symbol="BTCUSDT", orderIdList=["53666506695"]) Or client.futures_cancel_orders(symbol="BTCUSDT", orderIdList=[53666506695])

But it gives an error: binance.exceptions.BinanceAPIException: APIError(code=-1022): Signature for this request is not valid.

Pouya10 avatar May 12 '22 10:05 Pouya10

I have a similar problem. Please help!!! I get the same error when sending the order from a Heroku server as a response from a webhook triggered in Tradingview.

                    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
                    )

However, if I send the webhook from my Mac (to the Heroku server) I do not get the same error.

It 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.

gtellezgiron avatar May 20 '22 11:05 gtellezgiron

I also get that error using almost identical python code. Weirdly enough - I use the same method for placing all my limit orders and it works fine for some, but doesn't work for others. What could be the reason?

arsh-charlesriver avatar Feb 09 '23 18:02 arsh-charlesriver