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

[V2] Invalid query string param ordering for signature #42

Closed discosultan closed 5 years ago

discosultan commented 5 years ago

As of KuCoin API v2, the query string parameters used in signature generation should be ordered as specified in docs and not alphabetically.

Essentially the sorted() function call here is incorrect: https://github.com/sammchardy/python-kucoin/blob/3f98f166cad3096c7e376c9ffb1a2849a55822ea/kucoin/client.py#L99

To reproduce:

from kucoin.client import Client

client = Client('<key>', '<secret>', '<passphrase>')
client.get_orders(status='done', symbol='ETH-BTC')
sammchardy commented 5 years ago

Thanks @discosultan can you check if this is fixed in v2.0.2

discosultan commented 5 years ago

@sammchardy That fixed it for me, thank you!