skka3134

skka3134

email
telegram

1. ccxt Download Data

  1. Install anaconda
  2. Install pycharm
  3. Install ccxt, ccxt encapsulates the APIs of many exchanges, which can be used to download data or initiate trades
pip3 install ccxt
  1. Instantiate the exchange, using Binance as an example
exchange = ccxt.binance({
    'apiKey': '',
    'secret': '',
    'enableRateLimit': True,
})
exchange.load_markets()
  1. 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)
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.