{"id":22138889,"url":"https://github.com/stoqey/finnhub","last_synced_at":"2025-07-25T22:32:14.779Z","repository":{"id":38425958,"uuid":"252324338","full_name":"stoqey/finnhub","owner":"stoqey","description":"Finnhub NodeJS wrapper","archived":false,"fork":false,"pushed_at":"2023-05-10T04:28:25.000Z","size":393,"stargazers_count":13,"open_issues_count":8,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-08T14:52:10.023Z","etag":null,"topics":["candles","cryptocurrency-exchanges","finnhub","finnhub-api","forex-trading","market-data","nodejs-wrapper","price-updates","quote","realtime","stock-prices","stocks-api","ticks"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/stoqey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["ceddybi"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-04-02T01:18:20.000Z","updated_at":"2023-05-19T20:56:57.000Z","dependencies_parsed_at":"2024-06-19T02:58:27.841Z","dependency_job_id":"55089194-e5c1-4aa9-b81d-a4cea671040e","html_url":"https://github.com/stoqey/finnhub","commit_stats":{"total_commits":86,"total_committers":5,"mean_commits":17.2,"dds":0.4418604651162791,"last_synced_commit":"4c0b33faa7b4134e093829f64700df0fbf6085ea"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoqey%2Ffinnhub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoqey%2Ffinnhub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoqey%2Ffinnhub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stoqey%2Ffinnhub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stoqey","download_url":"https://codeload.github.com/stoqey/finnhub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227621850,"owners_count":17795021,"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":["candles","cryptocurrency-exchanges","finnhub","finnhub-api","forex-trading","market-data","nodejs-wrapper","price-updates","quote","realtime","stock-prices","stocks-api","ticks"],"created_at":"2024-12-01T20:12:14.907Z","updated_at":"2024-12-01T20:12:15.697Z","avatar_url":"https://github.com/stoqey.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ceddybi"],"categories":[],"sub_categories":[],"readme":"# Finnhub - NodeJS Wrapper\n\n\u003cimg alt=\"NPM\" src=\"https://circleci.com/gh/stoqey/finnhub.svg?style=svg\"\u003e\u003c/img\u003e\n\n#### Features\n\n- Candles\n- Tick\n- Quote\n- Real-time price updates\n- Company Profile2\n- Recommendation Trends\n- Peers\n\n### Install\n```\nnpm i @stoqey/finnhub\n\nor\n\nyarn add @stoqey/finnhub\n```\n\n### Initialize\nSet env variable `FINNHUB_KEY` with the token you get from Finnhub.\n\nor simply assign it from the constructors\n\n```ts\nimport FinnhubAPI, { FinnhubWS } from '@stoqey/finnhub';\n\n// For API\nconst finnhubAPI = new FinnhubAPI(finnHubKey);\n\n// For Websockets\nconst finnhubWs = new FinnhubWS(finnHubKey); // or leave finnHubKey blank if process.env.FINNHUB_KEY is set\n```\n\n### Get Candles\n```ts\nconst candles = await finnhubAPI.getCandles(symbol, startDate, endDate, '1');\n```\n\n### Get Ticks\n```ts\nconst ticks = await finnhubAPI.getTick(symbol, date);\n```\n\n### Get Quote\n```ts\nconst quote = await finnhubAPI.getQuote(symbol);\n```\n\n### Get Company Profile2\n```ts\nconst companyProfile = await finnhubAPI.getCompanyProfile2(symbol);\n```\n\n### Get Recommendation Trends\n```ts\nconst recommendations = await finnhubAPI.GetRecommendationTrends(symbol);\n```\n\n### Get Peers\n```ts\nconst peers = await finnhubAPI.getPeers(symbol);\n```\n\n\n### Real-time price updates\n```ts\nfinnhubWs.on(\"onReady\", async () =\u003e {\n        console.log('WS is ready');\n});\n\nfinnhubWs.on(\"onData\", async (data: TickData) =\u003e {\n        console.log('WS onData', data);\n});\n\n// Add symbol to streaming list\nfinnhubWs.addSymbol(\"AAPL\");\n\n// Stop streaming symbol\nfinnhubWs.removeSymbol(\"AAPL\");\n\n```\n\n\n##\nSet `process.env.DEBUG = \"finnhub*\"` to see all logs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoqey%2Ffinnhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstoqey%2Ffinnhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstoqey%2Ffinnhub/lists"}