I don’t know why but I have an X amount of MINA locked. I tried to sell this amount, to cancel a filled order… but is imposible. I could not find a way to put out the locked amount of MINA.
I know how to sell in SPOT really easily, but now is impossible for me to solve this.
This is my code:
mina = (client.get_asset_balance(SYMBOL))
print(mina)
orders = client.get_all_orders(symbol=symbol_form)
orderId = orders[0]['orderId']
cancel = client.cancel_order(symbol = symbol_form, orderId = orderId)
And this is the output:
{'asset': 'MINA', 'free': '3.82219000', 'locked': '137.40000000'}
Traceback (most recent call last):
File "/home/mpaya5/Documentos/Crypto/family/spot-futures/test.py", line 76, in <module>
cancel = client.cancel_order(symbol = symbol_form, orderId = orderId)
File "/home/mpaya5/Documentos/Crypto/family/spot-futures/venv/lib/python3.10/site-packages/binance/client.py", line 1879, in cancel_order
return self._delete('order', True, data=params)
File "/home/mpaya5/Documentos/Crypto/family/spot-futures/venv/lib/python3.10/site-packages/binance/client.py", line 380, in _delete
return self._request_api('delete', path, signed, version, **kwargs)
File "/home/mpaya5/Documentos/Crypto/family/spot-futures/venv/lib/python3.10/site-packages/binance/client.py", line 334, in _request_api
return self._request(method, uri, signed, **kwargs)
File "/home/mpaya5/Documentos/Crypto/family/spot-futures/venv/lib/python3.10/site-packages/binance/client.py", line 315, in _request
return self._handle_response(self.response)
File "/home/mpaya5/Documentos/Crypto/family/spot-futures/venv/lib/python3.10/site-packages/binance/client.py", line 324, in _handle_response
raise BinanceAPIException(response, response.status_code, response.text)
binance.exceptions.BinanceAPIException: APIError(code=-2011): Unknown order sent.