bingX-connector-python icon indicating copy to clipboard operation
bingX-connector-python copied to clipboard

Error opening a trade

Open IsaTTeN opened this issue 2 years ago • 2 comments

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

IsaTTeN avatar Dec 26 '23 23:12 IsaTTeN

I edited my first post, if I open a short it works

IsaTTeN avatar Dec 27 '23 22:12 IsaTTeN

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

dekaru avatar Jan 10 '24 00:01 dekaru