{"id":13499856,"url":"https://github.com/piquette/finance-go","last_synced_at":"2025-05-16T09:06:04.837Z","repository":{"id":37789469,"uuid":"120223204","full_name":"piquette/finance-go","owner":"piquette","description":":bar_chart: Financial markets data library implemented in go.","archived":false,"fork":false,"pushed_at":"2023-08-07T03:39:03.000Z","size":160,"stargazers_count":736,"open_issues_count":15,"forks_count":102,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-09T04:03:39.375Z","etag":null,"topics":["cryptocurrency","data","finance","financial-data","financial-markets","go-library","golang","options","pandas","scraper","stock-data","stock-market","stock-trading"],"latest_commit_sha":null,"homepage":"https://piquette.io/projects/finance-go","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/piquette.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2018-02-04T21:06:17.000Z","updated_at":"2025-03-25T01:54:23.000Z","dependencies_parsed_at":"2024-01-22T04:48:27.250Z","dependency_job_id":null,"html_url":"https://github.com/piquette/finance-go","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":0.28,"last_synced_commit":"0cef86a16c683a1dafcfb4d26a231893b1a9fc07"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piquette%2Ffinance-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piquette%2Ffinance-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piquette%2Ffinance-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piquette%2Ffinance-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piquette","download_url":"https://codeload.github.com/piquette/finance-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501558,"owners_count":22081528,"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":["cryptocurrency","data","finance","financial-data","financial-markets","go-library","golang","options","pandas","scraper","stock-data","stock-market","stock-trading"],"created_at":"2024-07-31T22:00:44.462Z","updated_at":"2025-05-16T09:05:59.827Z","avatar_url":"https://github.com/piquette.png","language":"Go","funding_links":[],"categories":["Go","Golang","Financial Data \u0026 APIs"],"sub_categories":["Market data"],"readme":"# finance-go\n\n[![GoDoc](http://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/piquette/finance-go) [![Build Status](https://travis-ci.org/piquette/finance-go.svg?branch=master)](https://travis-ci.org/piquette/finance-go) [![Coverage Status](https://coveralls.io/repos/github/piquette/finance-go/badge.svg?branch=master)](https://coveralls.io/github/piquette/finance-go?branch=master)\n\n## Summary\n\nThis go package aims to provide a go application with access to current and historical financial markets data in streamlined, well-formatted structures.\n\nCheck out the [qtrn cli application][qtrn], which is intended as a living example of this package. It prints quotes/options info in your favorite command-line in a few keystrokes!\n\n### Features\n\nDescription | Source\n--- | ---\nQuote(s) | Yahoo finance\nEquity quote(s) | Yahoo finance\nIndex quote(s) | Yahoo finance\nOption quote(s) | Yahoo finance\nForex pair quote(s) | Yahoo finance\nCryptocurrency pair quote(s) | Yahoo finance\nFutures quote(s) | Yahoo finance\nETF quote(s) | Yahoo finance\nMutual fund quote(s) | Yahoo finance\nHistorical quotes | Yahoo finance\nOptions straddles | Yahoo finance\n\n## Documentation\n\nA neatly formatted detailed list of implementation instructions and examples will be available on the [piquette website][api-docs].\n\nFor now, for details on all the functionality in this library, see the [GoDoc][godoc] documentation.\n\n## Installation\n\nThis project supports modules and Go 1.13+. Add `finance-go` to your own project the usual way -\n\n```sh\ngo get github.com/piquette/finance-go\n```\n\n## Usage example\n\nLibrary usage is meant to be very specific about the user's intentions.\n\n### Quote\n```go\nq, err := quote.Get(\"AAPL\")\nif err != nil {\n  // Uh-oh.  \n  panic(err)\n}\n\n// Success!\nfmt.Println(q)\n```\n\n### Equity quote (more fields)\n```go\nq, err := equity.Get(\"AAPL\")\nif err != nil {\n  // Uh-oh.  \n  panic(err)\n}\n\n// Success!\nfmt.Println(q)\n```\n\n### Historical quotes (OHLCV)\n```go\nparams := \u0026chart.Params{\n  Symbol:   \"TWTR\",\n  Interval: datetime.OneHour,\n}\niter := chart.Get(params)\n\nfor iter.Next() {\n  fmt.Println(iter.Bar())\n}\nif err := iter.Err(); err != nil {\n  fmt.Println(err)\n}\n```\n\n## Development\n\nPull requests from the community are welcome. If you submit one, please keep\nthe following guidelines in mind:\n\n1. All types, structs and funcs should be documented.\n2. Ensure that `make test` succeeds.\n\n## Test\n\nThe test suite needs testify's `require` package to run:\n\n    github.com/stretchr/testify/require\n\nIt also depends on a running instance of a test server [finance-mock], so make sure to fetch that project and run the application from another terminal session ([finance-mock's README][finance-mock] contains more information).\n\n### Docker\n```sh\n  docker run -p 12111:12111 piquette/finance-mock:latest\n```\n### Brew\n\n    brew tap piquette/finance-mock\n    brew install finance-mock\n    finance-mock\n\n### Go\n\n    go get -u github.com/piquette/finance-mock\n    finance-mock\n\nRun all tests:\n\n    go test ./...\n\nRun tests for one package:\n\n    go test ./equity\n\nRun a single test:\n\n    go test ./equity -run TestGet\n\nFor any requests, bug or comments, please [open an issue][issues] or [submit a\npull request][pulls]. Also please email or tweet me as needed.\n\n## Notes\n- Yahoo changes their finance APIs without warning, which is their right to do so. However, its annoying and leads to some instability in this project..\n- Big shoutout to Stripe and the team working on the [stripe-go][stripe] project, I took a lot of library design / implementation hints from them.\n\n[godoc]: http://godoc.org/github.com/piquette/finance-go\n[issues]: https://github.com/piquette/finance-go/issues/new\n[qtrn]: https://github.com/piquette/qtrn\n[pulls]: https://github.com/piquette/finance-go/pulls\n[finance-mock]: https://github.com/piquette/finance-mock\n[stripe]: https://github.com/stripe/stripe-go\n[api-docs]: https://piquette.io/projects/finance-go/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiquette%2Ffinance-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiquette%2Ffinance-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiquette%2Ffinance-go/lists"}