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.

Revisions

  1. jmoz created this gist May 12, 2020.
    11 changes: 11 additions & 0 deletions ftx_api_balance.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    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)