sammchardy / python-kucoin

Kucoin REST and Websocket API python implementation
https://python-kucoin.readthedocs.io/en/latest/
MIT License
349 stars 147 forks source link

Documentation Issue: Limit order returns 'orderId' not 'orderOid' #55

Open dafrizzy opened 5 years ago

dafrizzy commented 5 years ago

Minor issue but the comments for the create_limit_order() function state the function returns "orderOid":

.. code:: python order = client.create_limit_order('KCS-BTC', Client.SIDE_BUY, '0.01', '1000') :returns: ApiResponse .. code:: python { "orderOid": "596186ad07015679730ffa02" } :raises: KucoinResponseException, KucoinAPIException, LimitOrderException """

but after running the code, the buy_response I'm getting appears to be returning "orderId"

LeKlex commented 5 years ago

They changed the API response, have a look at https://docs.kucoin.com/#place-a-new-order

But the client order id is still "clientOid"

dafrizzy commented 5 years ago

Yeah that's true it does. They still got rid of "orderOid" though. To be honest, I'm not exactly sure what the difference is between "clientOid", "id", and "orderId" in this new platform for buy/sell/open orders. Open orders seems to return both "clientOid" and "id" while buy and sell limit orders return "orderId". The documentation on their website isn't super clear to me about the differences between each.

LeKlex commented 5 years ago

Yeah that's true it does. They still got rid of "orderOid" though. To be honest, I'm not exactly sure what the difference is between "clientOid", "id", and "orderId" in this new platform for buy/sell/open orders. Open orders seems to return both "clientOid" and "id" while buy and sell limit orders return "orderId". The documentation on their website isn't super clear to me about the differences between each.

The "clientOid" can be set by the client/you (identification of orders in your system), the "id" is given by the KuCoin. You don't need to use the "clientOid", I just go along with KuCoins "id".