gfin
Lightweight Python SDK for gfin, a hosted Google Finance data API for builders.
gfin gives you access to Google Finance-style market data without maintaining browser automation or private RPC plumbing: symbol search, quotes, historical prices, financials, earnings, related assets, sentiment, market summaries, news, realtime snapshots, watchlists, and natural-language research through product-native namespaces. Use it for dashboards, agents, notebooks, research tools, watchlists, prototyping, and app backends.
This SDK is intentionally straightforward: plain dict responses, typed
errors, automatic retries, and a symbol-scoped ticker workbench.
Docs: https://docs.gfin.dev/python-sdk
pip install gfin
Quick Use
import gfin
client = gfin.Client()
apple = client.ticker("AAPL")
quote = apple.quote(exchange="NASDAQ")
history = apple.history(exchange="NASDAQ")
answer = client.research.ask("Why is AAPL moving today?")
print(quote["data"], history["data"], answer["data"])
Common Calls
client.symbols.search("apple")
client.quotes.get("AAPL", exchange="NASDAQ")
client.prices.history("AAPL", exchange="NASDAQ")
client.financials.get("AAPL")
client.earnings.get("AAPL")
client.market.movers()
client.news.latest(limit=10)
client.realtime.quotes(entity_ids=["/m/0cqyw"])
client.watchlists.get()
The client is organized around gfin product areas: symbols, quotes,
prices, financials, earnings, related, sentiment, market, news,
research, realtime, watchlists, and management. Use
client.ticker("AAPL") for symbol-scoped quote, details, profile, history,
financials, earnings, related-asset, and sentiment calls.
Runtime Support
Configuration can come from constructor options or environment variables:
| Option | Environment | Purpose |
|---|---|---|
base_url |
GFIN_BASE_URL |
Override https://api.gfin.dev; must be http or https |
contact |
GFIN_CONTACT |
Send optional support metadata |
api_key |
GFIN_API_KEY |
Send email-verified API credentials |
management_token |
GFIN_MANAGEMENT_TOKEN |
Manage API keys after email verification |
api_key is sent as Authorization: Bearer <key> by default. Pass
api_key_header="x-gfin-key" to use X-Gfin-Key instead.
The SDK retries transient 429, 502, 503, and 504 responses by default.
Use max_retries, retry_statuses, backoff_factor, max_backoff, and
backoff_jitter when you need tighter control, or set max_retries=0.
Keep API keys on a server when you do not control the runtime.
Errors
HTTP errors raise GfinError. HTTP 429 raises GfinRateLimitError; HTTP 503
raises GfinServiceBusyError after retry exhaustion. Error objects include
retry_after, status, and request IDs when provided.
Metadata
Release files for gfin 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gfin-0.1.3.tar.gz | 8.8 kB | With provenance | Details for gfin-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gfin-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for gfin-0.1.3-py3-none-any.whl |
Total release size: 15.6 kB
Release files / gfin-0.1.3.tar.gz
| Download URL | gfin-0.1.3.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b101720af9539b92cabe9cb12ddf00f22e2cb6c58b44e5d9839cdf37967dd244
|
|
BLAKE2b-256 checksum How to use checksums |
6b225d0ec3d9ff3c20013b460430463ebbfdbda00f308021d13dd5b0eb37e102
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 28, 2026.
Transparency logRelease files / gfin-0.1.3-py3-none-any.whl
| Download URL | gfin-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
554919d96dbb78aab88072698e27bca5e3e95d87700d0b1395f126bc3234f97e
|
|
BLAKE2b-256 checksum How to use checksums |
58b2088321a61237c66dff8064ea805df221f147e78db0d19d8565005fa1850a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 28, 2026.
Transparency logSecurity for gfin 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gfin-0.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.