Created
May 12, 2020 11:40
-
-
Save jmoz/6d15662d131357ac1ec5f2d1c4abf364 to your computer and use it in GitHub Desktop.
Python CCXT FTX API get balance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ccxt | |
c = ccxt.ftx({ | |
'apiKey': 'YOURKEY', | |
'secret': 'YOURSECRET', | |
'enableRateLimit': True, | |
#'headers': {'FTX-SUBACCOUNT': 'YOURSUBACCOUNTNAME'}, # uncomment line if using subaccount | |
}) | |
balance = c.fetch_balance() | |
print(balance) | |
print(balance['total']['BTC']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would recommend you use the ccxt library as they have added FTX API support and they are standardising exchange APIs.