{"id":13614104,"url":"https://github.com/markcheno/go-quote","last_synced_at":"2025-04-04T20:12:42.793Z","repository":{"id":37951752,"uuid":"53990583","full_name":"markcheno/go-quote","owner":"markcheno","description":"Yahoo finance/Google finance/Coinbase/Bittrex/Binance/Tiingo historical quote downloader library and cli written in golang","archived":false,"fork":false,"pushed_at":"2024-02-25T22:49:52.000Z","size":298,"stargazers_count":314,"open_issues_count":6,"forks_count":80,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-05-22T15:31:19.501Z","etag":null,"topics":["binance","binance-api","bitcoin","bittrex","bittrex-api","cli","coinbase","ethereum","financial-data","gdax","gdax-api","golang","historical-cryptocurrency-prices","historical-data","litecoin","quotes","tiingo","yahoo","yahoo-finance-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markcheno.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-16T01:19:58.000Z","updated_at":"2024-06-18T14:06:34.219Z","dependencies_parsed_at":"2024-02-25T23:34:44.019Z","dependency_job_id":"2d8a4ee0-a349-46bb-9e4a-d9c76a10d191","html_url":"https://github.com/markcheno/go-quote","commit_stats":{"total_commits":79,"total_committers":11,"mean_commits":7.181818181818182,"dds":0.3291139240506329,"last_synced_commit":"555891babbf192d56f9fa949b0fd28914df3276d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcheno%2Fgo-quote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcheno%2Fgo-quote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcheno%2Fgo-quote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markcheno%2Fgo-quote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markcheno","download_url":"https://codeload.github.com/markcheno/go-quote/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242681,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binance","binance-api","bitcoin","bittrex","bittrex-api","cli","coinbase","ethereum","financial-data","gdax","gdax-api","golang","historical-cryptocurrency-prices","historical-data","litecoin","quotes","tiingo","yahoo","yahoo-finance-api"],"created_at":"2024-08-01T20:00:57.011Z","updated_at":"2025-04-04T20:12:42.786Z","avatar_url":"https://github.com/markcheno.png","language":"Go","readme":"# go-quote\n\n[![GoDoc](http://godoc.org/github.com/markcheno/go-quote?status.svg)](http://godoc.org/github.com/markcheno/go-quote)\n\nA free quote downloader library and cli\n\nDownloads 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.\n\n- Update: 04/01/2025 - added markets flag, wildcard input files, multiple inputs\n\n- Update: 03/02/2025 - Removed obsolete Yahoo support\n\n- Update: 02/15/2024 - Major update: updated to Go 1.22, removed bittrex/binance support, fixed nasdaq/tiingo markets\n\n- Update: 11/15/2021 - Removed obsolete markets, converted to go modules\n\n- Update: 7/18/2021 - Removed obsolete Google support\n\n- Update: 6/26/2019 - updated GDAX to Coinbase, added coinbase market\n\n- Update: 4/26/2018 - Added preliminary [tiingo](https://api.tiingo.com/) CRYPTO support. Use -source=tiingo-crypto -token=\u003cyour_tingo_token\u003e You can also set env variable TIINGO_API_TOKEN. To get symbol lists, use market: tiingo-btc, tiingo-eth or tiingo-usd\n\n- Update: 12/21/2017 - Added Amibroker format option (creates csv file with separate date and time). Use -format=ami\n\n- Update: 12/20/2017 - Added [Binance](https://www.binance.com/trade.html) exchange support. Use -source=binance\n\n- Update: 12/18/2017 - Added [Bittrex](https://bittrex.com/home/markets) exchange support. Use -source=bittrex\n\n- Update: 10/21/2017 - Added Coinbase [GDAX](https://www.gdax.com/trade/BTC-USD) exchange support. Use -source=gdax All times are in UTC. Automatically rate limited.\n\n- Update: 7/19/2017 - Added preliminary [tiingo](https://api.tiingo.com/) support. Use -source=tiingo -token=\u003cyour_tingo_token\u003e You can also set env variable TIINGO_API_TOKEN\n\n- 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!\n\nStill very much in alpha mode. Expect bugs and API changes. Comments/suggestions/pull requests welcome!\n\nCopyright 2024 Mark Chenoweth\n\nInstall CLI utility (quote) with:\n\n```bash\ngo install github.com/markcheno/go-quote/quote@latest\n```\n\n```\nUsage:\n  quote -h | -help\n  quote -v | -version\n  quote \u003cmarket\u003e [-output=\u003coutputFile\u003e]\n  quote [-years=\u003cyears\u003e|(-start=\u003cdatestr\u003e [-end=\u003cdatestr\u003e])] [options] [-infile=\u003cfilename\u003e|\u003csymbol\u003e ...]\n\nOptions:\n  -h -help             show help\n  -v -version          show version\n  -years=\u003cyears\u003e       number of years to download [default=5]\n  -start=\u003cdatestr\u003e     yyyy[-[mm-[dd]]]\n  -end=\u003cdatestr\u003e       yyyy[-[mm-[dd]]] [default=today]\n  -infile=\u003cfilename\u003e   list of symbols to download\n  -markets=\u003clist\u003e      list of markets to download (comma separated)\n  -outfile=\u003cfilename\u003e  output filename\n  -period=\u003cperiod\u003e     1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|d|3d|w|m [default=d]\n  -source=\u003csource\u003e     tiingo|tiingo-crypto|coinbase [default=tiingo]\n  -token=\u003ctiingo_tok\u003e  tingo api token [default=TIINGO_API_TOKEN]\n  -format=\u003cformat\u003e     (csv|json|hs|ami) [default=csv]\n  -all=\u003cbool\u003e          all in one file (true|false) [default=false]\n  -log=\u003cdest\u003e          filename|stdout|stderr|discard [default=stdout]\n  -delay=\u003cms\u003e          delay in milliseconds between quote requests\n\nNote: not all periods work with all sources\n\nValid markets:\netf,nasdaq,nasdaq100,amex,nyse,megacap,largecap,midcap,smallcap,microcap,nanocap,\ntelecommunications,health_care,finance,real_estate,consumer_discretionary,\nconsumer_staples,industrials,basic_materials,energy,utilities\ncoinbase,tiingo-usd,tiingo-btc,tiingo-eth\n```\n\n## CLI Examples\n\n```bash\n# display usage\nquote -help\n\n# downloads 10 years of smallcap, midcap, largecap and megacap stocks to stocks.csv\nquote -markets=smallcap,midcap,largecap,megacap -all=true -years=10 -outfile=stocks.csv\n\n# downloads 10 years of spy,qqq and djia to indexes.csv\nquote -years=10 -outfile=indexes.csv -all=true spy qqq djia\n\n# downloads 5 years of Tiingo SPY history to spy.csv (TIINGO_API_TOKEN must be set)\nquote spy\n\n# downloads 1 year of bitcoin history to BTC-USD.csv\nquote -years=1 -source=coinbase BTC-USD\n\n\n# downloads full etf symbol list to etf.txt, also works for nasdaq,nasdaq100,nyse,amex\nquote etf\n\n# download fresh etf list and 5 years of etf data all in one file\nquote -markets=etf -all=true -outfile=etf.csv\n```\n\n## Install library\n\nInstall the package with:\n\n```bash\ngo get github.com/markcheno/go-quote@latest\n```\n\n## Library example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/markcheno/go-quote\"\n\t\"github.com/markcheno/go-talib\"\n)\n\nfunc main() {\n\tspy, _ := quote.NewQuoteFromTiingo(\"spy\", \"2016-01-01\", \"2016-04-01\", quote.Daily, true)\n\tfmt.Print(spy.CSV())\n\trsi2 := talib.Rsi(spy.Close, 2)\n\tfmt.Println(rsi2)\n}\n```\n\n## License\n\nMIT License - see LICENSE for more details\n","funding_links":[],"categories":["Golang","Go"],"sub_categories":["Market data"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcheno%2Fgo-quote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkcheno%2Fgo-quote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkcheno%2Fgo-quote/lists"}