Skip to content

Instantly share code, notes, and snippets.

@jmoz
Created May 12, 2020 13:31
Show Gist options
  • Save jmoz/0c254ee2f2e9eeeaa3f366a327b9ad37 to your computer and use it in GitHub Desktop.
Save jmoz/0c254ee2f2e9eeeaa3f366a327b9ad37 to your computer and use it in GitHub Desktop.
FTX API get balance
import FtxClient
c = FtxClient(
api_key='YOURKEY',
api_secret='YOURSECRET',
)
balance = c.get_balances()
print(balance)
btc_total = next((b['total'] for b in balance if b['coin'] == 'BTC'))
print(btc_total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment