sammchardy / python-idex

IDEX v3 Exchange REST API python implementation

Home Page:https://python-idex.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cancel signature invalid

rfenzo opened this issue · comments

I've been able to make new orders, but when I try to cancel them, i'm getting this signature error. Any ideas?

Traceback (most recent call last): File "/home/rfenzo/CryptoWallet/code/idextrader.py", line 33, in <module> client.cancel_order(last_buy_order) File "/home/rfenzo/.local/lib/python3.5/site-packages/idex/client.py", line 1397, in cancel_order return self._post('cancel', True, hash_data=hash_data, json=json_data) File "/home/rfenzo/.local/lib/python3.5/site-packages/idex/client.py", line 144, in _post return self._request('post', path, signed, **kwargs) File "/home/rfenzo/.local/lib/python3.5/site-packages/idex/client.py", line 123, in _request return self._handle_response(response) File "/home/rfenzo/.local/lib/python3.5/site-packages/idex/client.py", line 135, in _handle_response raise IdexAPIException(response) idex.exceptions.IdexAPIException: IdexAPIException: Cancel signature invalid. Please try again.

where the order is placed like this:

order = client.create_order(...)
last_buy_order = order["orderHash"]

Hi @rfenzo do you have the latest version v0.2.3?

There were some recent fixes for the cancel order signature generation.

Yes, I also reinstalled the package. It's only me having this problem?

I've tried several times checking the code and the api documentation searching an error, but my inexperienced eyes can't find the error. May I get a little help here please?

Hi, having the same issue with 0.2.3 and 0.2.4, any help?

Hi @rfenzo and @blaaaaaaa I really thought I'd included this in the last releases, sorry about that.

v0.2.5 now works as expected.

Thank you @sammchardy !. Now I got another problem,you broke the get_my_balances function as I can see. The get_balances() receives a token name or contract address, and a boolean, and get_my_balances() calls get_balances(self._wallet_address,boolean), so it raises and error when trying to find a token with a contract address like your wallet_address.

Traceback (most recent call last): File "/home/rfenzo/Desktop/untitled.py", line 7, in <module> print(client.get_my_balances()) File "/usr/local/lib/python3.5/dist-packages/idex/client.py", line 885, in get_my_balances return self.get_balances(self._wallet_address, complete) File "/usr/local/lib/python3.5/dist-packages/idex/client.py", line 832, in get_balances currency = self.get_currency(token) File "/usr/local/lib/python3.5/dist-packages/idex/client.py", line 780, in get_currency raise IdexCurrencyNotFoundException(currency)

get_balances(token) is also failing, it only works for 'ETH' as far i can see.

ok v0.2.7 will resolve that