Skip to content

Instantly share code, notes, and snippets.

Created September 15, 2020 04:06
What would you like to do?
ccxt library in Python to fetch OHLCV data
import ccxt
import time
binance = ccxt.binance()
if binance.has['fetchOHLCV']:
for symbol in binance.load_markets():
time.sleep (binance.rateLimit / 1000) # time.sleep wants seconds
print(symbol, binance.fetch_ohlcv(symbol, '1d')) # one day
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment