- Install Anaconda.
- Install PyCharm.
- Install ccxt, which encapsulates APIs for many exchanges and allows you to download data or initiate trades.
pip3 install ccxt
- Instantiate the exchange, in this case, we are using Binance.
exchange = ccxt.binance({
'apiKey': '',
'secret': '',
'enableRateLimit': True,
})
exchange.load_markets()
- Download the candlestick chart for BTC/USDT.
symbol = 'BTC/USDT'
time_interval = '1d'
start = exchange.parse8601('2020-01-01T00:00:00')
data = exchange.fetch_ohlcv(symbol=symbol, timeframe=time_interval, since=start)