python-kucoin icon indicating copy to clipboard operation
python-kucoin copied to clipboard

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

Open dafrizzy opened this issue 5 years ago • 3 comments

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"

dafrizzy avatar Mar 19 '19 00:03 dafrizzy

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"

LeKlex avatar Mar 19 '19 08:03 LeKlex

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.

dafrizzy avatar Mar 26 '19 22:03 dafrizzy

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

LeKlex avatar Mar 27 '19 07:03 LeKlex