Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import ccxt
- exchanges = {
- "bitmex": {
- "apiKey": "***",
- "secret": "***"
- },
- }
- exchange = ccxt.bitmex()
- exchange.apiKey = exchanges["bitmex"]["apiKey"]
- exchange.secret = exchanges["bitmex"]["secret"]
- balance = exchange.fetch_balance()
- print("free:" + str(balance["free"]))
- print("used:" + str(balance["used"]))
- print("total:" + str(balance["total"]))
Add Comment
Please, Sign In to add comment