Closed ghost closed 6 years ago
Hi @tcollins590 just checking are you using the latest version v0.1.6?
@sammchardy Looks like I am using 0.1.6
Also using python 2.7
Same issue here. Btw, thanks for the great work!!
It's strange, those calls keep changing their details on me. As far as I can tell I have them implemented how they should be.
https://kucoinapidocs.docs.apiary.io/#reference/0/trading/cancel-orders https://kucoinapidocs.docs.apiary.io/#reference/0/trading/cancel-all-orders
So just to confirm cancel_all_orders
works without a symbol. If you check their docs it seems to indicate symbol is required.
For cancel_order
I do have symbol as required, but think I need to change it as all I really feel needs to be passed for this called would be the orderOid
, let me make a branch with that option for you to test.
I'm trying to get some clarification from the Kucoin devs around it, but they reply when they feel like it, to questions they feel like answering.
Thank you for looking into this.
Yeah when i run cancel_all_order
alone it works fine. When I add a symbol I get the error.
For cancel_order
I am passing the 3 arguments symbol, orderOid, type
. Getting the error with that.
Testing it locally cancel_order
returns Not Found if symbol not passed, and then Signature verification failed once you add symbol in.
They are the only calls that use query string parameters and the signature generation doesn't say what to do with those, I'd say that may be the issue.
Would definitely encourage both of you to email product@kucoin.com about this, see if we can get a resolution.
I managed to get the cancel_all_orders(symbol) to work. Just had to send the symbol parameter along with the order_type. I don't have time to try the other cancel methods right now, but I believe the same fix should work.
My cancel_all_orders method: ` def cancel_all_orders(self, symbol=None, order_type=None): """Cancel all orders
https://kucoinapidocs.docs.apiary.io/#reference/0/trading/cancel-all-orders
:param symbol: Name of symbol e.g. KCS-BTC
:type symbol: string
:param order_type: Order type
:type order_type: string
.. code:: python
# cancel all active orders
client.cancel_all_orders()
# cancel all KCS-BTC Buy orders
client.cancel_all_orders('KCS-BTC', 'BUY')
:returns: None
:raises: KucoinResponseException, KucoinAPIException
"""
data = {}
if order_type:
data['type'] = order_type
path = 'order/cancel-all'
if symbol:
data['symbol'] = symbol
return self._post(path, True, data=data)`
Ok, I've pushed v0.1.7 to fix the cancel_order
and cancel_all_order
functions. Thanks for your help.
Thank you for writing this package, it's great.
I am running into an issue when trying to use certain order cancellation functions. Cancel_all_orders alone works well.
I run into issues when adding a symbol parameter to the function (ie. 'NULS-ETH') or when using the cancel_order function.