{"id":13412849,"url":"https://github.com/m1/go-finnhub","last_synced_at":"2025-03-14T18:32:32.279Z","repository":{"id":57509222,"uuid":"233690283","full_name":"m1/go-finnhub","owner":"m1","description":"Simple and easy to use client for stock market, forex and crypto data from finnhub.io written in Go. Access real-time financial market data from 60+ stock exchanges, 10 forex brokers, and 15+ crypto exchanges","archived":true,"fork":false,"pushed_at":"2020-02-01T14:53:23.000Z","size":38,"stargazers_count":90,"open_issues_count":0,"forks_count":19,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-07-30T20:43:01.438Z","etag":null,"topics":["crytpocurrency","financial-data","financial-markets","finnhub","forex","forex-data","forex-market","forex-trading","go","go-library","golang","golang-crypto","golang-library"],"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/m1.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}},"created_at":"2020-01-13T20:47:13.000Z","updated_at":"2024-05-27T10:44:18.000Z","dependencies_parsed_at":"2022-09-12T23:13:29.641Z","dependency_job_id":null,"html_url":"https://github.com/m1/go-finnhub","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1%2Fgo-finnhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1%2Fgo-finnhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1%2Fgo-finnhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m1%2Fgo-finnhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m1","download_url":"https://codeload.github.com/m1/go-finnhub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221495313,"owners_count":16832458,"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":["crytpocurrency","financial-data","financial-markets","finnhub","forex","forex-data","forex-market","forex-trading","go","go-library","golang","golang-crypto","golang-library"],"created_at":"2024-07-30T20:01:30.046Z","updated_at":"2024-10-26T04:31:20.041Z","avatar_url":"https://github.com/m1.png","language":"Go","funding_links":[],"categories":["Financial","金融","金融领域相关库","Relational Databases","金融领域相关库`处理货币与金融领域的库`"],"sub_categories":["Search and Analytic Databases","检索及分析资料库","SQL 查询语句构建库","Advanced Console UIs"],"readme":"# go-finnhub\n\n[![GoDoc](https://godoc.org/github.com/m1/go-finnhub?status.svg)](https://godoc.org/github.com/m1/go-finnhub)\n[![Build Status](https://travis-ci.org/m1/go-finnhub.svg?branch=master)](https://travis-ci.org/m1/go-finnhub)\n[![Go Report Card](https://goreportcard.com/badge/github.com/m1/go-finnhub)](https://goreportcard.com/report/github.com/m1/go-finnhub)\n[![Release](https://img.shields.io/github/release/m1/go-finnhub.svg)](https://github.com/m1/go-finnhub/releases/latest)\n[![codecov](https://codecov.io/gh/m1/go-finnhub/branch/master/graph/badge.svg)](https://codecov.io/gh/m1/go-finnhub)\n\n__Simple and easy to use client for stock, forex and crpyto data from [finnhub.io](https://finnhub.io/) written in Go. Access real-time market data from 60+ stock exchanges, 10 forex brokers, and 15+ crypto exchanges__\n\n## Installation\n\n`go get github.com/m1/go-finnhub`\n\n## Usage\n\nFirst sign up for your api token here [finnhub.io](https://finnhub.io/)\n\nFollow this basic example, for more in-depth documentation see the [docs](https://godoc.org/github.com/m1/go-finnhub):\n```go\nc := client.New(\"your_token_here\")\n\n// Stocks\ncompany, err := c.Stock.GetProfile(\"AAPL\")\nceo, err := c.Stock.GetCEO(\"AAPL\")\nrecommendation, err := c.Stock.GetRecommendations(\"AAPL\")\ntarget, err := c.Stock.GetPriceTarget(\"AAPL\")\noptions, err := c.Stock.GetOptionChain(\"DBD\")\npeers, err := c.Stock.GetPeers(\"AAPL\")\nearnings, err := c.Stock.GetEarnings(\"AAPL\")\ncandle, err := c.Stock.GetCandle(\"AAPL\", finnhub.CandleResolutionDay, nil)\nexchanges, err := c.Stock.GetExchanges()\nsymbols, err := c.Stock.GetSymbols(\"US\")\ngradings, err := c.Stock.GetGradings(\u0026finnhub.GradingParams{Symbol: \"AAPL\"})\n\n// Crypto\nexchanges, err := c.Crypto.GetExchanges()\nsymbols, err := c.Crypto.GetSymbols(\"Binance\")\ncandle, err := c.Crypto.GetCandle(\"BINANCE:BEAMUSDT\", finnhub.CandleResolutionMonth, nil)\n\n// Forex\nexchanges, err := c.Forex.GetExchanges()\nsymbols, err := c.Forex.GetSymbols(\"oanda\")\ncandle, err := c.Forex.GetCandle(\"OANDA:XAU_GBP\", finnhub.CandleResolutionMonth, nil)\n\n// News\nnews, err := c.News.Get(nil)\nnews, err = c.News.Get(\u0026finnhub.NewsParams{Category: finnhub.NewsCategoryCrypto})\nnews, err = c.News.GetCompany(\"AAPL\")\nsentiment, err := c.News.GetSentiment(\"AAPL\")\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1%2Fgo-finnhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm1%2Fgo-finnhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm1%2Fgo-finnhub/lists"}