python-binance
python-binance copied to clipboard
Signature for this request is not valid
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.
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.
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?