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

Getting InvalidAuthorization #10

Open
cesalo opened this issue Nov 24, 2021 · 0 comments
Open

Getting InvalidAuthorization #10

cesalo opened this issue Nov 24, 2021 · 0 comments

Comments

@cesalo
Copy link

cesalo commented Nov 24, 2021

This the error I'm getting:

Traceback (most recent call last):
  File "/app/./recurring-buy.py", line 165, in <module>
    schedule.run_pending()
  File "/usr/local/lib/python3.9/site-packages/schedule/__init__.py", line 780, in run_pending
    default_scheduler.run_pending()
  File "/usr/local/lib/python3.9/site-packages/schedule/__init__.py", line 100, in run_pending
    self._run_job(job)
  File "/usr/local/lib/python3.9/site-packages/schedule/__init__.py", line 172, in _run_job
    ret = job.run()
  File "/usr/local/lib/python3.9/site-packages/schedule/__init__.py", line 661, in run
    ret = self.job_func()
  File "/app/./recurring-buy.py", line 122, in recurring_buy
    result = add_funds(buy_total, current_funds, max_fund, fund_source, currency)
  File "/app/./recurring-buy.py", line 77, in add_funds
    deposit = auth_client.deposit(amount=fund_amount, currency=currency, payment_method_id=payment_id)
  File "/usr/local/lib/python3.9/site-packages/coinbasepro/auth_client.py", line 774, in deposit
    r = self._send_message(
  File "/usr/local/lib/python3.9/site-packages/coinbasepro/public_client.py", line 474, in _send_message
    self._check_errors_and_raise(r)
  File "/usr/local/lib/python3.9/site-packages/coinbasepro/public_client.py", line 433, in _check_errors_and_raise
    raise InvalidAuthorization(message)
coinbasepro.exceptions.InvalidAuthorization: Forbidden

The key seems to be ok - Wondering if maybe the issue is with this part:
"Fund-Source" : "default"
Is there a way to specify an account?
Thanks.

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

1 participant