{"id":21933744,"url":"https://github.com/ggoodwin/go-stocks","last_synced_at":"2025-12-14T22:55:42.828Z","repository":{"id":65253577,"uuid":"588349565","full_name":"ggoodwin/go-stocks","owner":"ggoodwin","description":"Go Library that allows you to query real-time stock market information.","archived":false,"fork":false,"pushed_at":"2023-09-04T15:05:01.000Z","size":243,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-10T04:23:30.197Z","etag":null,"topics":["currency","go","golang","library","nyse","nyse-stocks","stock","stock-market","stocks","ticker","tickers"],"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/ggoodwin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null},"funding":{"github":["ggoodwin"]}},"created_at":"2023-01-12T22:52:55.000Z","updated_at":"2025-07-02T17:36:33.000Z","dependencies_parsed_at":"2023-09-04T20:36:53.590Z","dependency_job_id":null,"html_url":"https://github.com/ggoodwin/go-stocks","commit_stats":null,"previous_names":["ggoodwin/go-nyse-stocks","ggoodwin/stocks-go","octolibs/yahoo-stocks","octolibs/nyse-stocks","ggoodwin/nyse-stocks","ggoodwin/go-stocks"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/ggoodwin/go-stocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggoodwin%2Fgo-stocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggoodwin%2Fgo-stocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggoodwin%2Fgo-stocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggoodwin%2Fgo-stocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggoodwin","download_url":"https://codeload.github.com/ggoodwin/go-stocks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggoodwin%2Fgo-stocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27738528,"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","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["currency","go","golang","library","nyse","nyse-stocks","stock","stock-market","stocks","ticker","tickers"],"created_at":"2024-11-29T00:13:30.024Z","updated_at":"2025-12-14T22:55:42.805Z","avatar_url":"https://github.com/ggoodwin.png","language":"Go","funding_links":["https://github.com/sponsors/ggoodwin"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\t\u003ch1\u003e\u003cimg alt=\"go-stocks logo\" src=\"https://github.com/ggoodwin/go-stocks/blob/master/nyse.png\" height=\"300\" /\u003e\u003cbr /\u003e\n\t\tStock Info Go Library\n\t\u003c/h1\u003e\n\n\u003ch2\u003eDiscord\u003c/h2\u003e\n\n[![ggoodwin](https://dcbadge.vercel.app/api/shield/179795086543028224)](https://discord.id/?prefill=179795086543028224)\n\n\u003ch2\u003eGo\u003c/h2\u003e\n\n[![Go Reference](https://pkg.go.dev/badge/ggoodwin/go-stocks.svg)](https://pkg.go.dev/github.com/ggoodwin/go-stocks) [![Go Version](https://img.shields.io/github/go-mod/go-version/ggoodwin/go-stocks)](https://go.dev/doc/go1.19)\n\n\u003ch2\u003eRepo Info\u003c/h2\u003e\n\n![Size](https://img.shields.io/github/languages/code-size/ggoodwin/go-stocks) [![Last Commit](https://img.shields.io/github/last-commit/ggoodwin/go-stocks)](https://github.com/ggoodwin/go-stocks/commits/master) [![License](https://img.shields.io/github/license/ggoodwin/go-stocks)](https://github.com/ggoodwin/go-stocks/blob/master/LICENSE.md)\n\n\u003ch2\u003eCode Reports\u003c/h2\u003e\n\n[![GoReportCard](https://goreportcard.com/badge/github.com/ggoodwin/go-stocks)](https://goreportcard.com/report/github.com/ggoodwin/go-stocks) [![CodeFactor](https://www.codefactor.io/repository/github/ggoodwin/go-stocks/badge)](https://www.codefactor.io/repository/github/ggoodwin/go-stocks) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/17f51d3e54264211b19220ce470783ae)](https://app.codacy.com/gh/ggoodwin/go-stocks/dashboard) [![Coverage Status](https://coveralls.io/repos/github/ggoodwin/go-stocks/badge.svg?branch=master)](https://coveralls.io/github/ggoodwin/go-stocks?branch=master)\n\n\u003ch2\u003eActions\u003c/h2\u003e\n\n[![Go](https://github.com/ggoodwin/go-stocks/actions/workflows/go.yml/badge.svg?branch=master)](https://github.com/ggoodwin/go-stocks/actions/workflows/go.yml) [![lint](https://github.com/ggoodwin/go-stocks/actions/workflows/lint.yml/badge.svg?branch=master)](https://github.com/ggoodwin/go-stocks/actions/workflows/lint.yml) [![CodeQL](https://github.com/ggoodwin/go-stocks/actions/workflows/github-code-scanning/codeql/badge.svg?branch=master)](https://github.com/ggoodwin/go-stocks/actions/workflows/github-code-scanning/codeql) [![Vulnerabilities](https://github.com/ggoodwin/go-stocks/actions/workflows/vulnerabilities.yml/badge.svg?branch=master)](https://github.com/ggoodwin/go-stocks/actions/workflows/vulnerabilities.yml) [![Coveralls](https://github.com/ggoodwin/go-stocks/actions/workflows/coveralls.yml/badge.svg?branch=master)](https://github.com/ggoodwin/go-stocks/actions/workflows/coveralls.yml)\n\n\u003c/div\u003e\n\u003chr/\u003e\n\n## 🌟 How it works\n\nWe use the [Yahoo API] to gather real-time stock data.\n\n## 📦 Installation and Usage\n\n### Go\n\nMake sure you have `Go` installed on your machine.\n\nYou can check by running the following command in the `console`\n\n```plain\ngo version\n```\n\nIf you don't have `Go` installed, you can [Download Go] and install it.\n\n### Add to your project\n\nRun the following command in the `console`, in the `project directory`, to install the library with `go get`\n\n```plain\ngo get github.com/ggoodwin/go-stocks\n```\n\n### Importing\n\nAdd the import to your `.go` file\n\n```go\nimport stocks \"github.com/ggoodwin/go-stocks\"\n```\n\n## 💰 Usage\n\n### Stock Price and Percentage Change\n\nAdd this to your `.go` file\n\n```go\n// Parameter: Stock Symbol\n// Returns: strings ex: `$123.45`, `1.23%`, `↑`\nprice, percent, direction := stocks.GetPriceAndPercentage(\"AAPL\")\n```\n\n### Get full stock details\n\n```go\n// Parameter: Stock Symbol\n// Returns `Result` struct\nstock := stocks.GetFullDetails(\"AAPL\")\n```\n\n### Result struct\n\n```go\ntype Result struct {\n\tSymbol                            string  `json:\"symbol\"`\n\tShortName                         string  `json:\"shortName\"`\n\tQuoteSourceName                   string  `json:\"quoteSourceName\"`\n\tLanguage                          string  `json:\"language\"`\n\tRegion                            string  `json:\"region\"`\n\tQuoteType                         string  `json:\"quoteType\"`\n\tTriggerable                       bool    `json:\"triggerable\"`\n\tCurrency                          string  `json:\"currency\"`\n\tExchange                          string  `json:\"exchange\"`\n\tMessageBoardID                    string  `json:\"messageBoardId\"`\n\tExchangeTimezoneName              string  `json:\"exchangeTimezoneName\"`\n\tExchangeTimezoneShortName         string  `json:\"exchangeTimezoneShortName\"`\n\tGmtOffSetMilliseconds             int     `json:\"gmtOffSetMilliseconds\"`\n\tMarket                            string  `json:\"market\"`\n\tEsgPopulated                      bool    `json:\"esgPopulated\"`\n\tFirstTradeDateMilliseconds        int64   `json:\"firstTradeDateMilliseconds\"`\n\tRegularMarketChange               float64 `json:\"regularMarketChange\"`\n\tRegularMarketChangePercent        float64 `json:\"regularMarketChangePercent\"`\n\tRegularMarketTime                 int     `json:\"regularMarketTime\"`\n\tRegularMarketPrice                float64 `json:\"regularMarketPrice\"`\n\tRegularMarketDayHigh              float64 `json:\"regularMarketDayHigh\"`\n\tRegularMarketDayRange             string  `json:\"regularMarketDayRange\"`\n\tRegularMarketDayLow               float64 `json:\"regularMarketDayLow\"`\n\tRegularMarketVolume               int64   `json:\"regularMarketVolume\"`\n\tRegularMarketPreviousClose        float64 `json:\"regularMarketPreviousClose\"`\n\tFullExchangeName                  string  `json:\"fullExchangeName\"`\n\tRegularMarketOpen                 float64 `json:\"regularMarketOpen\"`\n\tAverageDailyVolume3Month          int64   `json:\"averageDailyVolume3Month\"`\n\tAverageDailyVolume10Day           int64   `json:\"averageDailyVolume10Day\"`\n\tStartDate                         int     `json:\"startDate\"`\n\tCoinImageURL                      string  `json:\"coinImageUrl\"`\n\tFiftyTwoWeekLowChange             float64 `json:\"fiftyTwoWeekLowChange\"`\n\tFiftyTwoWeekLowChangePercent      float64 `json:\"fiftyTwoWeekLowChangePercent\"`\n\tFiftyTwoWeekRange                 string  `json:\"fiftyTwoWeekRange\"`\n\tFiftyTwoWeekHighChange            float64 `json:\"fiftyTwoWeekHighChange\"`\n\tFiftyTwoWeekHighChangePercent     float64 `json:\"fiftyTwoWeekHighChangePercent\"`\n\tFiftyTwoWeekLow                   float64 `json:\"fiftyTwoWeekLow\"`\n\tFiftyTwoWeekHigh                  float64 `json:\"fiftyTwoWeekHigh\"`\n\tFiftyDayAverage                   float64 `json:\"fiftyDayAverage\"`\n\tFiftyDayAverageChange             float64 `json:\"fiftyDayAverageChange\"`\n\tFiftyDayAverageChangePercent      float64 `json:\"fiftyDayAverageChangePercent\"`\n\tTwoHundredDayAverage              float64 `json:\"twoHundredDayAverage\"`\n\tTwoHundredDayAverageChange        float64 `json:\"twoHundredDayAverageChange\"`\n\tTwoHundredDayAverageChangePercent float64 `json:\"twoHundredDayAverageChangePercent\"`\n\tMarketCap                         int64   `json:\"marketCap\"`\n\tSourceInterval                    int     `json:\"sourceInterval\"`\n\tExchangeDataDelayedBy             int     `json:\"exchangeDataDelayedBy\"`\n\tTradeable                         bool    `json:\"tradeable\"`\n\tMarketState                       string  `json:\"marketState\"`\n}\n```\n\n## 💻 Dependencies\n\n- [Go]\n\n## 🙇‍♂️ Issues and Contributing\n\nIf you find an issue with this library, please report the issue using our [Github Issues] or check out the [Security] details if it is security related.\n\nIf you'd like, I welcome any contributions. Please read the [Contributing] document then [Fork] this library and submit a [Pull Request]. Make sure to click `compare across forks` to see your fork.\n\n## ⚖️ License\n\nThis project is under the MIT License. See the [License] file for the full license text.\n\n## 📜 Changes\n\nCheck out our [Changelog]\n\n## 👍🏻 Code of Conduct\n\nPlease read my [Code of Conduct] before contributing or engaging in discussions.\n\n\u003c!-- Links --\u003e\n[LICENSE]: https://github.com/ggoodwin/go-stocks/blob/master/LICENSE.md\n[CHANGELOG]: https://github.com/ggoodwin/go-stocks/blob/master/CHANGELOG.md\n[SECURITY]: https://github.com/ggoodwin/go-stocks/blob/master/SECURITY.md\n[FORK]: https://github.com/ggoodwin/go-stocks/fork\n[PULL REQUEST]: https://github.com/ggoodwin/go-stocks/compare\n[CODE OF CONDUCT]: https://github.com/ggoodwin/go-stocks/blob/master/CODE_OF_CONDUCT.md\n[CONTRIBUTING]: https://github.com/ggoodwin/go-stocks/blob/master/CONTRIBUTING.md\n[GITHUB ISSUES]: https://github.com/ggoodwin/go-stocks/issues\n[YAHOO API]: https://finance.yahoo.com/most-active\n[GO]: https://go.dev/\n[DOWNLOAD GO]: https://go.dev/dl/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggoodwin%2Fgo-stocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggoodwin%2Fgo-stocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggoodwin%2Fgo-stocks/lists"}