Skip to content

Instantly share code, notes, and snippets.

@mazmex7
Created June 12, 2018 02:25
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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