Skip to content

Instantly share code, notes, and snippets.

@mazmex7
Created June 12, 2018 02:25
Show Gist options
  • Save mazmex7/32aa5891275bfda2a6200c2116dc851a to your computer and use it in GitHub Desktop.
Save mazmex7/32aa5891275bfda2a6200c2116dc851a to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
# prepare api-keys and initiate bitmex-api-client instance: bitmex_client
orderbook, res = bitmex_client.OrderBook.OrderBook_getL2(symbol='XBTUSD', depth=1).result()
rate_limit = res.headers['X-RateLimit-Limit']
rate_remain = res.headers['X-RateLimit-Remaining']
rate_reset = res.headers['X-RateLimit-Reset']
print(rate_limit, rate_remain, rate_reset)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment