Skip to content

nmharmon8/DSD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Script To Downloads Stock Data from Alpha Vantage

A simple script to download stock data from alphavantage.co. Specifically it is setup to download the NASDAQ top 500.

Dependencies:

Install

cd DSD
sudo python setup.py install

Setup API

Get a free API key from AlphaVantage

export the API key as an environmental variable. I recommend just adding it to your bashrc so it is always available.

echo "export ALPHA_VANTAGE_KEY=<Your API Key Here>" >> ~/.bashrc
#Should look somthing like "export ALPHA_VANTAGE_KEY=AHKDSFJHUDFDJD"
source ~/.bashrc

Usage

from dsd import download_nasdaq_data as dnd

'''
Downloads multiple companies
'''
dnd.downloadNTopMarketCapCompanies(500, output_dir='stock_data')

'''
Given a stock symbol (aka 'tsla') will download and save the data to the
output dir as a csv 
'''
dnd.download_symbol(symbol, output_dir, retry_count=4)

Have fun.

About

Downloads Stock Data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages