Skip to content

Instantly share code, notes, and snippets.

@jmoz
Created May 12, 2020 11:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoz/6d15662d131357ac1ec5f2d1c4abf364 to your computer and use it in GitHub Desktop.
Save jmoz/6d15662d131357ac1ec5f2d1c4abf364 to your computer and use it in GitHub Desktop.
Python CCXT FTX API get balance
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'])
@jmoz
Copy link
Author

jmoz commented May 12, 2020

I would recommend you use the ccxt library as they have added FTX API support and they are standardising exchange APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment