bingX-connector-python
bingX-connector-python copied to clipboard
Error opening a trade
Hello
I am trying to open an order using this code:
order=client.trade_order(symbol='ETH-USDT',type='MARKET',side='BUY',positionSide='LONG',quantity=0.23)
but I get this error:
raise ClientError(res['code'], res['msg']) bingX.error.ClientError: <exception str() failed>
If I use this code it works OK
order=client.trade_order(symbol='ETH-USDT',type='MARKET',side='SELL',positionSide='SHORT',quantity=0.23)
In BingX I am using Hedge Mode
Can you help me? I don´t know what I am doing wrong
I edited my first post, if I open a short it works
@IsaTTeN I also encountered this error during tests. I fixed it by adjusting the quantity, and making sure the account had enough funds to place that order. I found no official description of this error code, though.