Guest User

Untitled

a guest
Jun 18th, 2018
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import ccxt
  2.  
  3.  
  4. exchanges = {
  5. "bitmex": {
  6. "apiKey": "***",
  7. "secret": "***"
  8. },
  9. }
  10.  
  11. exchange = ccxt.bitmex()
  12. exchange.apiKey = exchanges["bitmex"]["apiKey"]
  13. exchange.secret = exchanges["bitmex"]["secret"]
  14.  
  15. balance = exchange.fetch_balance()
  16.  
  17. print("free:" + str(balance["free"]))
  18. print("used:" + str(balance["used"]))
  19. print("total:" + str(balance["total"]))
Add Comment
Please, Sign In to add comment