Created
May 12, 2020 13:31
-
-
Save jmoz/0c254ee2f2e9eeeaa3f366a327b9ad37 to your computer and use it in GitHub Desktop.
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 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