Closed CerebralSeed closed 1 year ago
Describe the bug When attempting to create_futures_order on testnet=True, returns APIError(code=-1022): Signature for this request is not valid.
create_futures_order
testnet=True
APIError(code=-1022): Signature for this request is not valid.
To Reproduce Code snippet to reproduce the behavior:
from binance.client import Client import time from binkey import keys bin_client=Client(keys.testapik, keys.testsk, testnet=True) time.sleep(0.5) symbol='BTCUSDT' print(bin_client.futures_mark_price(symbol=symbol)) # ^^^ OKAY!!! - so it's not an API key issue close_position = bin_client.futures_create_order(symbol=symbol, type='MARKET', side='BUY', amount=0.01, params={'reduceOnly': True}) # ^^^ Error! print(close_position)
Expected behavior I expect a BUY order to close up to 0.01 of my position at MARKET.
Environment (please complete the following information):
Logs or Additional context binance.exceptions.BinanceAPIException: APIError(code=-1022): Signature for this request is not valid.
binance.exceptions.BinanceAPIException: APIError(code=-1022): Signature for this request is not valid.
Problem was the "amount" parameter should have been "quantity".
Describe the bug When attempting to
create_futures_order
ontestnet=True
, returnsAPIError(code=-1022): Signature for this request is not valid.
To Reproduce Code snippet to reproduce the behavior:
Expected behavior I expect a BUY order to close up to 0.01 of my position at MARKET.
Environment (please complete the following information):
Logs or Additional context
binance.exceptions.BinanceAPIException: APIError(code=-1022): Signature for this request is not valid.