LUCIT-Systems-and-Development / unicorn-binance-rest-api

A Python SDK by LUCIT to use the Binance REST API`s (com+testnet, com-margin+testnet, com-isolated_margin+testnet, com-futures+testnet, us, tr) in a simple, fast, flexible, robust and fully-featured way.
https://unicorn-binance-rest-api.docs.lucit.tech
Other
61 stars 17 forks source link

Cannot send isolated margin orders #40

Closed nikky78 closed 1 year ago

nikky78 commented 2 years ago

Version of this library.

unicorn_binance_rest_api==1.5.0

Solution to Issue cannot be found in the documentation or other Issues and also occurs in the latest version of this library.

Hardware?

Local server/workstation

Operating System?

Windows

Python version?

Python3.9

Installed packages

No response

Logging output

Input In [14] in <cell line: 1>
    response = rest.order_limit_buy(symbol='KDAUSDT', price=1.8, quantity=10, isIsolated=True, newClientOrderId='test_10')

  File ~\anaconda3\lib\site-packages\unicorn_binance_rest_api\manager.py:1623 in order_limit_buy
    return self.order_limit(timeInForce=timeInForce, **params)

  File ~\anaconda3\lib\site-packages\unicorn_binance_rest_api\manager.py:1585 in order_limit
    return self.create_order(**params)

  File ~\anaconda3\lib\site-packages\unicorn_binance_rest_api\manager.py:1546 in create_order
    return self._post('order', True, data=params)

  File ~\anaconda3\lib\site-packages\unicorn_binance_rest_api\manager.py:505 in _post
    return self._request_api('post', path, signed, version, **kwargs)

  File ~\anaconda3\lib\site-packages\unicorn_binance_rest_api\manager.py:455 in _request_api
    return self._request(method, uri, signed, **kwargs)

  File ~\anaconda3\lib\site-packages\unicorn_binance_rest_api\manager.py:450 in _request
    return self._handle_response()

  File ~\anaconda3\lib\site-packages\unicorn_binance_rest_api\manager.py:495 in _handle_response
    raise BinanceAPIException(self.response)

BinanceAPIException: APIError(code=-1104): Not all sent parameters were read; read '9' parameter(s) but was sent '10'.

Used endpoint?

binance.com-isolated_margin

Issue

To send isolated margin orders, it needs to accept isIsolated arguments, but it seems like it does not.

oliver-zehentleitner commented 1 year ago

Try isIsolated="TRUE"