Go Quote
Yahoo finance/Google finance/Coinbase/Bittrex/Binance/Tiingo historical quote downloader library and cli written in golang
Install / Use
npx skills add markcheno/go-quoteInstalls into whichever agent you are using.
README
go-quote
A free quote downloader library and cli
Downloads daily historical price quotes from Tiingo and daily/intraday data from various api's. Written in pure Go. No external dependencies. Now downloads crypto coin historical data from various exchanges.
-
Update: 09/04/2025 - added Tiingo CSV update mode (-update) with 10-day backfill, optional full re-download on corporate actions, and -concurrency for faster updates
-
Update: 04/01/2025 - added markets flag, wildcard input files, multiple inputs
-
Update: 03/02/2025 - Removed obsolete Yahoo support
-
Update: 02/15/2024 - Major update: updated to Go 1.22, removed bittrex/binance support, fixed nasdaq/tiingo markets
-
Update: 11/15/2021 - Removed obsolete markets, converted to go modules
-
Update: 7/18/2021 - Removed obsolete Google support
-
Update: 6/26/2019 - updated GDAX to Coinbase, added coinbase market
-
Update: 4/26/2018 - Added preliminary tiingo CRYPTO support. Use -source=tiingo-crypto -token=<your_tingo_token> You can also set env variable TIINGO_API_TOKEN. To get symbol lists, use market: tiingo-btc, tiingo-eth or tiingo-usd
-
Update: 12/21/2017 - Added Amibroker format option (creates csv file with separate date and time). Use -format=ami
-
Update: 12/20/2017 - Added Binance exchange support. Use -source=binance
-
Update: 12/18/2017 - Added Bittrex exchange support. Use -source=bittrex
-
Update: 10/21/2017 - Added Coinbase GDAX exchange support. Use -source=gdax All times are in UTC. Automatically rate limited.
-
Update: 7/19/2017 - Added preliminary tiingo support. Use -source=tiingo -token=<your_tingo_token> You can also set env variable TIINGO_API_TOKEN
-
Update: 5/24/2017 - Now works with the new Yahoo download format. Beware - Yahoo data quality is now questionable and the free Yahoo quotes are likely to permanently go away in the near future. Use with caution!
Still very much in alpha mode. Expect bugs and API changes. Comments/suggestions/pull requests welcome!
Copyright 2024 Mark Chenoweth
Install CLI utility (quote) with:
go install github.com/markcheno/go-quote/quote@latest
Usage:
quote -h | -help
quote -v | -version
quote <market> [-output=<outputFile>]
quote -markets=<markets> -all=true -outfile=stocks.csv
quote [-years=<years>|(-start=<datestr> [-end=<datestr>])] [options] [-infile=<filename>|<symbol> ...]
quote -update=<path> [-end=<datestr>] [-backfill-days=10] [-full-redownload-on-ca] [-concurrency=<n>] [-token=<tiingo_token>]
Options:
-h -help show help
-v -version show version
-years=<years> number of years to download [default=5]
-start=<datestr> yyyy[-[mm-[dd]]]
-end=<datestr> yyyy[-[mm-[dd]]] [default=today]
-infile=<filename> list of symbols to download
-markets=<list> list of markets to download (comma separated)
-outfile=<filename> output filename
-period=<period> 1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|d|3d|w|m [default=d]
-source=<source> tiingo|tiingo-crypto|coinbase [default=tiingo]
-token=<tiingo_tok> tingo api token [default=TIINGO_API_TOKEN]
-format=<format> (csv|json|hs|ami) [default=csv]
-all=<bool> all in one file (true|false) [default=false]
-log=<dest> filename|stdout|stderr|discard [default=stdout]
-delay=<ms> delay in milliseconds between quote requests
-update=<path> update an existing Tiingo CSV (single or -all multi) in place
-backfill-days=<n> days of overlap to rewrite [default=10]
-full-redownload-on-ca if splits/dividends detected, fully redownload the symbol block
-concurrency=<n> concurrent symbol fetches in update mode [default=1]
Note: not all periods work with all sources
Valid markets:
etf,nasdaq,nasdaq100,amex,nyse,megacap,largecap,midcap,smallcap,microcap,nanocap,
telecommunications,health_care,finance,real_estate,consumer_discretionary,
consumer_staples,industrials,basic_materials,energy,utilities
coinbase,tiingo-usd,tiingo-btc,tiingo-eth
CLI Examples
# display usage
quote -help
# downloads 10 years of smallcap, midcap, largecap and megacap stocks to stocks.csv
quote -markets=smallcap,midcap,largecap,megacap -all=true -years=10 -outfile=stocks.csv
# downloads 10 years of spy,qqq and djia to indexes.csv
quote -years=10 -outfile=indexes.csv -all=true spy qqq djia
# downloads 5 years of Tiingo SPY history to spy.csv (TIINGO_API_TOKEN must be set)
quote spy
# downloads 1 year of bitcoin history to BTC-USD.csv
quote -years=1 -source=coinbase BTC-USD
# downloads full etf symbol list to etf.txt, also works for nasdaq,nasdaq100,nyse,amex
quote etf
# download fresh etf list and 5 years of etf data all in one file
quote -markets=etf -all=true -outfile=etf.csv
# update a large multi-symbol CSV in place (Tiingo), 4 concurrent fetchers
quote -update=stocks.csv -concurrency=4
# update a single-symbol CSV inferred from filename (e.g., spy.csv)
quote -update=spy.csv -backfill-days=10 -full-redownload-on-ca
# control request pacing with -delay and concurrency
quote -delay=100 -update=stocks.csv -concurrency=8
Update mode rate limiting
- -delay=0: no global throttle; workers issue requests immediately.
- -delay>0: a single global limiter spaces requests across all workers by ~delay ms. Use higher -concurrency to overlap work while keeping polite pacing.
Tiingo rate limit guidance
- Start conservatively:
-delay=100..250and-concurrency=2..4. - Increase gradually and watch for
429 Too Many Requestsresponses. - Leave
-delay> 0 to be polite; set-delay=0only if your plan allows higher throughput.
Install library
Install the package with:
go get github.com/markcheno/go-quote@latest
Library example
package main
import (
"fmt"
"github.com/markcheno/go-quote"
"github.com/markcheno/go-talib"
)
func main() {
spy, _ := quote.NewQuoteFromTiingo("spy", "2016-01-01", "2016-04-01", quote.Daily, "your-tiingo-token")
fmt.Print(spy.CSV())
rsi2 := talib.Rsi(spy.Close, 2)
fmt.Println(rsi2)
}
License
MIT License - see LICENSE for more details
Related Skills
career-ops
63.2kOpen-source AI job search: scan job portals, evaluate listings with a structured A-F rubric into a 1.0-5.0 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)
gin-vue-admin
24.9k🚀Vite+Vue3+Gin拥有AI辅助的基础开发平台,企业级业务AI+开发解决方案,内置mcp辅助服务,内置skills管理,支持TS和JS混用。它集成了JWT鉴权、权限管理、动态路由、显隐可控组件、分页封装、多点登录拦截、资源权限、上传下载、代码生成器、表单生成器和可配置的导入导出等开发必备功能。
kubeshark
12.0keBPF-powered network observability for Kubernetes. Indexes L4/L7 traffic with full K8s context, decrypts TLS without keys. Queryable by AI agents via MCP and humans via dashboard.
valuecell
11.0kValueCell is a community-driven, multi-agent platform for financial applications.
