Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitstamp : subaccount API invalid signature #49

Closed
asmodehn opened this issue Jul 8, 2019 · 3 comments
Closed

Bitstamp : subaccount API invalid signature #49

asmodehn opened this issue Jul 8, 2019 · 3 comments

Comments

@asmodehn
Copy link
Contributor

asmodehn commented Jul 8, 2019

(gryphon2)alexv@pop-os:/opt/Projects/gryphon-strategies$ gryphon-exec script reset_balance --exchange_name bitstamp_btc_eur
{u'status': u'error', u'reason': u'Invalid signature', u'code': u'API0005'}
Traceback (most recent call last):
  File "/home/alexv/.virtualenvs/gryphon2/bin/gryphon-exec", line 11, in <module>
    load_entry_point('gryphon', 'console_scripts', 'gryphon-exec')()
  File "/opt/Projects/gryphon/gryphon/execution/app.py", line 544, in main
    app.run()
  File "/home/alexv/.virtualenvs/gryphon2/local/lib/python2.7/site-packages/cement/core/foundation.py", line 882, in run
    return_val = self.controller._dispatch()
  File "/home/alexv/.virtualenvs/gryphon2/local/lib/python2.7/site-packages/cement/core/controller.py", line 471, in _dispatch
    return func()
  File "/home/alexv/.virtualenvs/gryphon2/local/lib/python2.7/site-packages/cement/core/controller.py", line 477, in _dispatch
    return func()
  File "/opt/Projects/gryphon/gryphon/execution/app.py", line 437, in default
    main_function(script_arguments=script_arguments, execute=execute)
  File "/opt/Projects/gryphon/gryphon/execution/scripts/reset_balance.py", line 159, in main
    fix_balance_issues_for_exchange(exchange_name, execute)
  File "/opt/Projects/gryphon/gryphon/execution/scripts/reset_balance.py", line 137, in fix_balance_issues_for_exchange
    exchange_balance = exchange.get_balance()
  File "exchange_api_wrapper.pyx", line 203, in gryphon.lib.exchange.exchange_api_wrapper.ExchangeAPIWrapper.get_balance (/home/alexv/.pyxbld/temp.linux-x86_64-2.7/pyrex/gryphon/lib/exchange/exchange_api_wrapper.c:5374)
  File "/opt/Projects/gryphon/gryphon/lib/exchange/bitstamp_btc_usd.py", line 232, in get_balance_resp
    'Balance missing expected keys',
gryphon.lib.exchange.exceptions.ExchangeAPIErrorException: [BITSTAMP_BTC_EUR] Balance missing expected keys

Anyone else having the same issue ? It used to work for main account... Any hint ?

@garethdmm
Copy link
Owner

I found one bug on a related project where the user had their CLIENT_ID set up incorrectly, I think you should be still using the CLIENT_ID of the main account.

@garethdmm
Copy link
Owner

I also noticed that you have to 'activate' api keys on sub accounts, which is a button next to the key. Maybe that is the issue?

@asmodehn
Copy link
Contributor Author

asmodehn commented Jul 9, 2019

The key was activated (error code is API0001 if it isnt)
The issue was indeed that I used the subaccount client, but the main account client id (with sub account keys) works.

@asmodehn asmodehn closed this as completed Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants