Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Authentication exception #5

Open
CharlieDixon opened this issue Feb 6, 2021 · 2 comments
Open

Authentication exception #5

CharlieDixon opened this issue Feb 6, 2021 · 2 comments

Comments

@CharlieDixon
Copy link

I can't seem to get the authentication to work successfully. Is anyone else having this problem? I've attached a code example below. The api_key and api_secret I've obviously changed out but they would be copied and pasted from the key generated on my profile page. I've tried generating a new key pair and have given it all permissions but still no luck.

import ftx

api_key = 'my_api_key_pasted'
api_secret = 'my_api_secret_key_pasted'
client = ftx.FtxClient(api_key=api_key, api_secret=api_secret)

acc_info = client.get_account_info()
print(acc_info)
Traceback (most recent call last):
  File "lending_history.py", line 7, in <module>
    acc_info = client.get_account_info()
  File "/mnt/c/Users/Username/PycharmProjects/ftx_lending/src/ftx/ftx/api.py", line 73, in wrapped
    return fn(self, *args, **kwargs)
  File "/mnt/c/Users/Username/PycharmProjects/ftx_lending/src/ftx/ftx/api.py", line 78, in get_account_info
    return self._get(f'account')
  File "/mnt/c/Users/Username/PycharmProjects/ftx_lending/src/ftx/ftx/api.py", line 20, in _get
    return self._request('GET', path, params=params)
  File "/mnt/c/Users/Username/PycharmProjects/ftx_lending/src/ftx/ftx/api.py", line 34, in _request
    return self._process_response(response)
  File "/mnt/c/Users/Username/PycharmProjects/ftx_lending/src/ftx/ftx/api.py", line 59, in _process_response
    raise Exception(data['error'])
Exception: Not logged in
@zombiegriff
Copy link

i put the key and the secret into their own 'strings', opposed to creating variables for them, and not had an issue connecting.

client = ftx.FtxClient(api_key='xxxxxxx', api_secret='xxxxxxx')

@sguthrie15
Copy link

how do i address the issue of getting access to the subaccount?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants