Skip to content

Latest commit

 

History

History
80 lines (46 loc) · 2.62 KB

File metadata and controls

80 lines (46 loc) · 2.62 KB

Market Data Endpoints

depth = client.get_order_book(symbol='BNBBTC')
trades = client.get_recent_trades(symbol='BNBBTC')
trades = client.get_historical_trades(symbol='BNBBTC')
trades = client.get_aggregate_trades(symbol='BNBBTC')
candles = client.get_klines(symbol='BNBBTC', interval=Client.KLINE_INTERVAL_30MINUTE)

Fetch klines for any date range and interval

# fetch 1 minute klines for the last day up until now
klines = client.get_historical_klines("BNBBTC", Client.KLINE_INTERVAL_1MINUTE, "1 day ago UTC")

# fetch 30 minute klines for the last month of 2017
klines = client.get_historical_klines("ETHBTC", Client.KLINE_INTERVAL_30MINUTE, "1 Dec, 2017", "1 Jan, 2018")

# fetch weekly klines since it listed
klines = client.get_historical_klines("NEOBTC", KLINE_INTERVAL_1WEEK, "1 Jan, 2017")
tickers = client.get_ticker()

Get last price for all markets.

prices = client.get_all_tickers()

Get first bid and ask entry in the order book for all markets.

tickers = client.get_orderbook_tickers()