ftx icon indicating copy to clipboard operation
ftx copied to clipboard

Authentication exception

Open CharlieDixon opened this issue 4 years ago • 2 comments

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

CharlieDixon avatar Feb 06 '21 00:02 CharlieDixon

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')

zombiegriff avatar Feb 21 '21 00:02 zombiegriff

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

sguthrie15 avatar Mar 24 '21 05:03 sguthrie15