text_plain_output_1.png
from binance import Client, ThreadedWebsocketManager, ThreadedDepthCacheManager

import pandas as pd

apikey = 'YOURAPIKEY'
secret = 'YOURAPISECRET'

client = Client(apikey, secret)

tickers = client.get_all_tickers()

ticker_df = pd.DataFrame(tickers)

depth = client.get_order_book(symbol='BTCUSDT')

depth_df = pd.DataFrame(depth['asks'])
depth_df.columns = ['Price', 'Volume']

historical = client.get_historical_klines('ETHBTC', Client.KLINE_INTERVAL_1DAY, '1 Jan 2011')

hist_df = pd.DataFrame(historical)

hist_df.columns = ['Open Time', 'Open', 'High', 'Low', 'Close', 'Volume', 'Close Time', 'Quote Asset Volume', 'Number of Trades', 'TB Base Volume', 'TB Quote Volume', 'Ignore']

hist_df.shape

hist_df.dtypes

hist_df.tail()