Lightweight Python SDK for gfin: hosted Google Finance quotes, prices, financials, market data, news, and research.
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gfin-0.1.3.tar.gz.
File metadata
- Download URL: gfin-0.1.3.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b101720af9539b92cabe9cb12ddf00f22e2cb6c58b44e5d9839cdf37967dd244
|
|
| MD5 |
d3a2ba1cbe206c7245ea789526d1582a
|
|
| BLAKE2b-256 |
6b225d0ec3d9ff3c20013b460430463ebbfdbda00f308021d13dd5b0eb37e102
|
Provenance
The following attestation bundles were made for gfin-0.1.3.tar.gz:
Publisher:
publish-gfin-python.yml on bluefin-ai/fin-services
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gfin-0.1.3.tar.gz -
Subject digest:
b101720af9539b92cabe9cb12ddf00f22e2cb6c58b44e5d9839cdf37967dd244 - Sigstore transparency entry: 1661025905
- Sigstore integration time:
-
Permalink:
bluefin-ai/fin-services@501a8dd6972163e834dc21c8f6af36bc12bd9547 -
Branch / Tag:
refs/tags/gfin-python-v0.1.3 - Owner: https://github.com/bluefin-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-gfin-python.yml@501a8dd6972163e834dc21c8f6af36bc12bd9547 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gfin-0.1.3-py3-none-any.whl.
File metadata
- Download URL: gfin-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
554919d96dbb78aab88072698e27bca5e3e95d87700d0b1395f126bc3234f97e
|
|
| MD5 |
4e418cd92dc4ed4dd1ffeeb847682fe2
|
|
| BLAKE2b-256 |
58b2088321a61237c66dff8064ea805df221f147e78db0d19d8565005fa1850a
|
Provenance
The following attestation bundles were made for gfin-0.1.3-py3-none-any.whl:
Publisher:
publish-gfin-python.yml on bluefin-ai/fin-services
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gfin-0.1.3-py3-none-any.whl -
Subject digest:
554919d96dbb78aab88072698e27bca5e3e95d87700d0b1395f126bc3234f97e - Sigstore transparency entry: 1661026060
- Sigstore integration time:
-
Permalink:
bluefin-ai/fin-services@501a8dd6972163e834dc21c8f6af36bc12bd9547 -
Branch / Tag:
refs/tags/gfin-python-v0.1.3 - Owner: https://github.com/bluefin-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-gfin-python.yml@501a8dd6972163e834dc21c8f6af36bc12bd9547 -
Trigger Event:
push
-
Statement type: