{"_id":"@bluefin-ai/gfin","_rev":"2-60a2f6c9b7ae5005a75e8545d278cd73","name":"@bluefin-ai/gfin","dist-tags":{"latest":"0.1.0"},"versions":{"0.0.1":{"name":"@bluefin-ai/gfin","version":"0.0.1","license":"MIT","_id":"@bluefin-ai/gfin@0.0.1","maintainers":[{"name":"bluedoor","email":"sam@bluedoor.sh"}],"homepage":"https://gfin.dev","bugs":{"url":"https://github.com/bluefin-ai/gfin/issues"},"dist":{"shasum":"e5e199eb707c74d8e4eb53ed7159699d1420d169","tarball":"https://registry.npmjs.org/@bluefin-ai/gfin/-/gfin-0.0.1.tgz","fileCount":3,"integrity":"sha512-Y3rBNwPE+J65Tz1yftJz75lfUtfWWSbWnxLB7G0w2+kTl/W0nYyxgjCZc9Eqjuc9lXcwuOj1nN+r0osnNp0PSQ==","signatures":[{"sig":"MEUCIQD5Eoox01TQNf3/uKTz5uGfrSYVL8gc148uz0bvdwo+PgIgXfbGNK7YOtNVxEkYUKkL2wDww7rRzSFsFZNYUocPVPk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":931},"main":"index.js","gitHead":"8bf254706b74a86715c875f93588a4af32a35cfd","_npmUser":{"name":"bluedoor","email":"sam@bluedoor.sh"},"repository":{"url":"git+https://github.com/bluefin-ai/gfin.git","type":"git","directory":"gfin/npm-placeholder"},"_npmVersion":"11.5.2","description":"Placeholder for the gfin SDK - reserved, implementation in progress.","directories":{},"_nodeVersion":"23.2.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/gfin_0.0.1_1779996827922_0.39119827211931213","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bluefin-ai/gfin","version":"0.1.0","description":"Lightweight TypeScript SDK for gfin: hosted Google Finance quotes, prices, financials, market data, news, and research.","license":"MIT","author":{"name":"gfin","email":"sam@gfin.dev"},"homepage":"https://docs.gfin.dev/typescript-sdk","repository":{"type":"git","url":"git+https://github.com/bluefin-ai/fin-services.git","directory":"gfin/typescript"},"bugs":{"url":"https://github.com/bluefin-ai/fin-services/issues"},"keywords":["finance","stocks","market-data","google-finance","quotes","historical-prices","research","typescript","sdk"],"type":"module","sideEffects":false,"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs","default":"./dist/index.mjs"},"./package.json":"./package.json"},"publishConfig":{"access":"public"},"scripts":{"build":"tsup","check":"npm run typecheck && npm test && npm run build && npm pack --dry-run","prepack":"npm run build","test":"vitest run","typecheck":"tsc --noEmit"},"devDependencies":{"@types/node":"^22.15.3","tsup":"^8.4.0","typescript":"^5.8.3","vitest":"^3.1.2"},"_id":"@bluefin-ai/gfin@0.1.0","gitHead":"31fe82a73d08fb5e61f4177481570edda65a805c","_nodeVersion":"23.2.0","_npmVersion":"11.5.2","dist":{"integrity":"sha512-5AwftH9Y8DOTL+8uwxZAxRrLD3Zf1Vr7sO9whXD162PnoSL6HGIzamih67ztr4gC9BjvqiBKTU8gTG0b7cFQdw==","shasum":"3e40253996e16d2d1d1a913f8395a1831b3ac94e","tarball":"https://registry.npmjs.org/@bluefin-ai/gfin/-/gfin-0.1.0.tgz","fileCount":10,"unpackedSize":119091,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCFv0U2Pe1GVnriDs8KqeiFNom7/wwqDYjcrIIFhhk9ewIhANVrfZRTBvK6wzS5uJQtprQwZdr8v2v8bdz1e69AWFb2"}]},"_npmUser":{"name":"bluedoor","email":"sam@bluedoor.sh"},"directories":{},"maintainers":[{"name":"bluedoor","email":"sam@bluedoor.sh"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gfin_0.1.0_1780004711875_0.11334576426678411"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-28T19:33:47.609Z","modified":"2026-05-28T21:45:12.135Z","0.0.1":"2026-05-28T19:33:48.057Z","0.1.0":"2026-05-28T21:45:12.029Z"},"bugs":{"url":"https://github.com/bluefin-ai/fin-services/issues"},"license":"MIT","homepage":"https://docs.gfin.dev/typescript-sdk","repository":{"type":"git","url":"git+https://github.com/bluefin-ai/fin-services.git","directory":"gfin/typescript"},"description":"Lightweight TypeScript SDK for gfin: hosted Google Finance quotes, prices, financials, market data, news, and research.","maintainers":[{"name":"bluedoor","email":"sam@bluedoor.sh"}],"readme":"# @bluefin-ai/gfin\n\nLightweight TypeScript SDK for gfin, a hosted Google Finance data API for\nbuilders.\n\ngfin gives you access to Google Finance-style market data without maintaining\nbrowser automation or private RPC plumbing: symbol search, quotes, historical\nprices, financials, earnings, related assets, sentiment, market summaries,\nnews, realtime snapshots, watchlists, and natural-language research through\nproduct-native namespaces. Use it for dashboards, agents, notebooks, research\ntools, watchlists, prototyping, and app backends.\n\nThis SDK is intentionally portable: no runtime dependencies, standard `fetch`,\nESM + CommonJS builds, bundled TypeScript declarations, typed errors, and\nautomatic retries.\n\nDocs: https://docs.gfin.dev/typescript-sdk\n\n```bash\nnpm install @bluefin-ai/gfin\n```\n\n## Quick Use\n\n```ts\nimport { Client } from \"@bluefin-ai/gfin\";\n\nconst client = new Client();\nconst apple = client.ticker(\"AAPL\");\n\nconst quote = await apple.quote({ exchange: \"NASDAQ\" });\nconst history = await apple.history({ exchange: \"NASDAQ\" });\nconst answer = await client.research.ask(\"Why is AAPL moving today?\");\n\nconsole.log(quote.data, history.data, answer.data);\n```\n\n## Common Calls\n\n```ts\nawait client.symbols.search(\"apple\");\nawait client.quotes.get(\"AAPL\", { exchange: \"NASDAQ\" });\nawait client.prices.history(\"AAPL\", { exchange: \"NASDAQ\" });\nawait client.financials.get(\"AAPL\");\nawait client.earnings.get(\"AAPL\");\nawait client.market.movers();\nawait client.news.latest({ limit: 10 });\nawait client.realtime.quotes({ entity_ids: [\"/m/0cqyw\"] });\nawait client.watchlists.get();\n```\n\nThe client is organized around gfin product areas: `symbols`, `quotes`,\n`prices`, `financials`, `earnings`, `related`, `sentiment`, `market`, `news`,\n`research`, `realtime`, `watchlists`, and `management`. Use\n`client.ticker(\"AAPL\")` for symbol-scoped quote, details, profile, history,\nfinancials, earnings, related-asset, and sentiment calls.\n\n## Runtime Support\n\nThe package uses the standard Fetch API. In Node, use Node 18+ or pass a custom\nfetch implementation:\n\n```ts\nconst client = new Client({ fetch: myFetch });\n```\n\nConfiguration can come from constructor options or environment variables in\nNode-like runtimes:\n\n| Option | Environment | Purpose |\n| --- | --- | --- |\n| `baseUrl` | `GFIN_BASE_URL` | Override `https://api.gfin.dev`; must be `http` or `https` |\n| `contact` | `GFIN_CONTACT` | Send optional support metadata |\n| `apiKey` | `GFIN_API_KEY` | Send email-verified API credentials |\n| `managementToken` | `GFIN_MANAGEMENT_TOKEN` | Manage API keys after email verification |\n\n`apiKey` is sent as `Authorization: Bearer <key>` by default. Pass\n`apiKeyHeader: \"x-gfin-key\"` to use `X-Gfin-Key` instead.\n\nThe SDK retries transient `429`, `502`, `503`, and `504` responses by default.\nUse `maxRetries`, `retryStatuses`, `backoffFactorMs`, `maxBackoffMs`, and\n`backoffJitter` when you need tighter control, or set `maxRetries: 0`.\n\nKeep API keys on a server when you do not control the runtime.\n\n## Auth Helpers\n\n```ts\nconst client = new Client();\nawait client.management.requestAuthOtp(\"you@example.com\");\nconst verified = await client.management.verifyAuthOtp(\"you@example.com\", \"123456\", {\n  label: \"agent\",\n});\nconst verifiedData = verified.data as {\n  api_key?: string;\n  management_token?: string;\n};\n\nconst authed = new Client({ apiKey: verifiedData.api_key });\nawait authed.management.requestLimitIncrease({\n  requestedRps: 25,\n  useCase: \"production agent workload\",\n  message: \"Short traffic description.\",\n});\n```\n\nAll successful calls return the hosted gfin envelope:\n\n```ts\ntype GfinEnvelope<TData = unknown> = {\n  data?: TData;\n  meta?: Record<string, unknown>;\n};\n```\n\n## Errors\n\nHTTP errors throw `GfinError`. HTTP 429 throws `GfinRateLimitError`; HTTP 503\nthrows `GfinServiceBusyError` after retry exhaustion. Error objects include\n`retryAfterSeconds`, `status`, `code`, `payload`, and request IDs when provided.\n","readmeFilename":"README.md","keywords":["finance","stocks","market-data","google-finance","quotes","historical-prices","research","typescript","sdk"],"author":{"name":"gfin","email":"sam@gfin.dev"}}