sammchardy / python-kucoin

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

Fix to make `create_limit_order` work #49

Closed avaucher closed 5 years ago

avaucher commented 5 years ago

This is the minimal changes I found to solve #47.

Feel free to refactor / update as you wish.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.3%) to 38.551% when pulling b373538e5e7e8c793a6a87dcf5ef9d76a58ad2f2 on avaucher:create_limit_order into a511b2b2dd157d23d61b3df6af004ddd8b30c45c on sammchardy:develop.

avaucher commented 5 years ago

I updated it again, get_accounts works for me now.

avaucher commented 5 years ago

I am not sure anymore whether setting the header values was mandatory, but I think that it didn't work without it.

Modifying the post body was mandatory as well: without it, a 401 error for a signature error was raised. My guess is that the JSON body must be 100% the same as was used for generating the signature (i.e., no spaces in the JSON string).

sammchardy commented 5 years ago

Makes sense. I'll give it a test shortly. Feel free to add me on Telegram too @sammchardy there.

sammchardy commented 5 years ago

Thanks @avaucher will close this as have rolled into v2.1.0 thanks for you testing!

avaucher commented 5 years ago

works for me, thanks!