This is an unofficial REST API wrapper for https://www.alphavantage.co
- Ensure you have a recent version of Go installed.
- Execute
go install github.com/portfoliotree/alphavantage/cmd/av@latest
- Check to see if it installed by executing
av help
Set an environment variable ALPHA_VANTAGE_TOKEN
with your token.
Fetches time series data for given symbols and writes the CSV result to a file.
- Given
av
is installed and the environment variableALPHA_VANTAGE_TOKEN
is set - When you run
av quotes --function=TIME_SERIES_MONTHLY IBM
and it succeeds - Then you will see a file "IBM.csv" in your current directory
The --function
may have any of the values listed in global_quote.go.
Fetches listing status and writes the result to a CSV file.
- Given
av
is installed and the environment variableALPHA_VANTAGE_TOKEN
is set - When you run
av listing-status --listed=false
and it succeeds - Then you will see a file "listing_status_false.csv" in your current directory
Queries the search endpoint and writes the output to stdout (standard out not a file).
- Given
av
is installed and the environment variableALPHA_VANTAGE_TOKEN
is set - When you run
av symbol-search 'VMware'
and it succeeds - Then you will see the result printed to standard out formatted as CSV.
Documents the above commands.
The output looks something like this.
av - An AlphaVantage CLI in Go
Global Flags:
-token string
api authentication token
Commands:
listing-status
Fetch listing & de-listing status.
https://www.alphavantage.co/documentation/#listing-status
quotes
Fetch time series stock quotes.
https://www.alphavantage.co/documentation/#time-series-data
symbol-search
Writes symbol search results to stdout.
https://www.alphavantage.co/documentation/#symbolsearch
Not all endpoints are supported yet. Make an Issue or PR if you'd like to have more endpoints covered.
I have found the CSV encoding easier to parse.
- TIME_SERIES_INTRADAY
- TIME_SERIES_DAILY
- TIME_SERIES_DAILY_ADJUSTED
- TIME_SERIES_MONTHLY
- TIME_SERIES_MONTHLY_ADJUSTED
- Quote
- Search Endpoint
- Company Overview
- Income Statement
- Balance Sheet
- Cashflow
- Earnings
- Listing & Delisting Status
- Earnings Calendar
- IPO Calendar
None implemented.
None implemented (I generally just use FRED directly).
None implemented.