Skip to content

Instantly share code, notes, and snippets.

@dkav6
Last active November 14, 2021 04:00
Show Gist options
  • Save dkav6/17d9f0dbb4c0aa96087d0bfc35281291 to your computer and use it in GitHub Desktop.
Save dkav6/17d9f0dbb4c0aa96087d0bfc35281291 to your computer and use it in GitHub Desktop.
def get_ohlc(ticker, period='60d', interval='5m'):
cols = ['Open','High','Low','Close']
ohlc = Ticker(ticker).history(period=period, interval=interval)[cols][:-1]
return ohlc
df = get_ohlc('ETH-USD')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment