ftx
ftx copied to clipboard
Authentication exception
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
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')
how do i address the issue of getting access to the subaccount?