Lightweight Python SDK for tvfin: hosted TradingView symbols, screeners, news, calendars, options, ideas, and scripts.
Project description
tvfin
Lightweight Python SDK for tvfin, a hosted TradingView data API for builders.
tvfin gives you access to TradingView market data without running your own browser or scraper stack: symbol search, news, economic calendars, earnings and dividend events, screeners, options data, public ideas, and public scripts 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 transient retries, and a public surface that follows tvfin
routes rather than upstream provider endpoint names.
Docs: https://docs.tvfin.bluedoor.sh
pip install tvfin
Quick Use
from tvfin import Client
client = Client()
symbols = client.symbols.search("apple", exchange="NASDAQ")
news = client.news.for_symbol("NASDAQ:AAPL")
screen = client.screeners.search("america", columns="name,close", limit=5)
chain = client.options.chain("AAPL", limit=10)
print(symbols["data"], news["data"], screen["data"], chain["data"])
Common Calls
client.symbols.search("tesla", type="stock")
client.news.headlines(lang="en")
client.news.flow(market="stocks")
client.calendar.economic(country="US")
client.events.earnings(limit=25, columns="name,earnings_release_date")
client.screeners.metadata("america")
client.screeners.search("america", limit=25, columns="name,close,volume")
client.screeners.global_search(markets="america,crypto", limit=25)
client.options.implied_volatility("AAPL")
client.options.underlying_aggregates("AAPL")
client.ideas.list(symbol="AAPL")
client.scripts.list(symbol="AAPL")
The client is organized around tvfin product areas: symbols, news,
calendar, events, screeners, options, ideas, scripts, and
management.
Runtime Support
Configuration can come from constructor options or environment variables:
| Option | Environment | Purpose |
|---|---|---|
base_url |
TVFIN_BASE_URL |
Override https://api.tvfin.bluedoor.sh; must be http or https |
contact |
TVFIN_CONTACT |
Send optional support metadata |
api_key |
TVFIN_API_KEY |
Send email-verified API credentials |
management_token |
TVFIN_MANAGEMENT_TOKEN |
Manage API keys after email verification |
api_key is sent as Authorization: Bearer <key> by default. Pass
api_key_header="x-tvfin-key" to use X-Tvfin-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.
Auth Helpers
client = Client()
client.management.request_auth_otp("you@example.com")
verified = client.management.verify_auth_otp("you@example.com", "123456", label="agent")
api_key = verified["data"]["api_key"]
management_token = verified["data"]["management_token"]
authed = Client(api_key=api_key)
authed.management.request_limit_increase(
requested_rps=25,
use_case="production agent workload",
message="Short traffic description.",
)
managed = Client(management_token=management_token)
keys = managed.management.keys.list()
created = managed.management.keys.create(label="batch job")
managed.management.keys.rotate(created["data"]["key"]["id"])
All successful calls return the hosted tvfin envelope:
{
"data": {},
"meta": {
"provider": "tradingview",
"generated_at": "2026-01-01T00:00:00Z",
"route": "symbols_search",
},
}
Errors
HTTP errors raise TvfinError. HTTP 429 raises TvfinRateLimitError; HTTP 503
raises TvfinServiceBusyError after retry exhaustion. Error objects include
retry_after, status, request_id, and the response message.
Project details
Release history Release notifications | RSS feed
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 tvfin-0.2.1.tar.gz.
File metadata
- Download URL: tvfin-0.2.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6bb8ed66bc5aa6b6cb16dc2fbce02e46e5dd9674e3b62edc50afad32321ed9c
|
|
| MD5 |
51e2e6f1f9148bb1f32cb056c8395f92
|
|
| BLAKE2b-256 |
8457d9ea6f03cf5b286409c9f95ddeae44dc1785d1bb5f3fb05ef6b840d2ddda
|
Provenance
The following attestation bundles were made for tvfin-0.2.1.tar.gz:
Publisher:
publish-tvfin-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:
tvfin-0.2.1.tar.gz -
Subject digest:
c6bb8ed66bc5aa6b6cb16dc2fbce02e46e5dd9674e3b62edc50afad32321ed9c - Sigstore transparency entry: 1661044547
- Sigstore integration time:
-
Permalink:
bluefin-ai/fin-services@bee9dfc46214140b8e5d0ba8e469b29899513c6d -
Branch / Tag:
refs/tags/tvfin-python-v0.2.1 - Owner: https://github.com/bluefin-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-tvfin-python.yml@bee9dfc46214140b8e5d0ba8e469b29899513c6d -
Trigger Event:
push
-
Statement type:
File details
Details for the file tvfin-0.2.1-py3-none-any.whl.
File metadata
- Download URL: tvfin-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.6 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 |
0c368d341fc7e410ccd947f06fd863966f04e222a89e3e616c436e1fc3bd1db7
|
|
| MD5 |
018fbbb55750bb441fb7558f14fbbcee
|
|
| BLAKE2b-256 |
62ca2106e502a2ed7b7cb35b2b1d67e60d465fb8cdf4a48c3f869460f100bdc9
|
Provenance
The following attestation bundles were made for tvfin-0.2.1-py3-none-any.whl:
Publisher:
publish-tvfin-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:
tvfin-0.2.1-py3-none-any.whl -
Subject digest:
0c368d341fc7e410ccd947f06fd863966f04e222a89e3e616c436e1fc3bd1db7 - Sigstore transparency entry: 1661044746
- Sigstore integration time:
-
Permalink:
bluefin-ai/fin-services@bee9dfc46214140b8e5d0ba8e469b29899513c6d -
Branch / Tag:
refs/tags/tvfin-python-v0.2.1 - Owner: https://github.com/bluefin-ai
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-tvfin-python.yml@bee9dfc46214140b8e5d0ba8e469b29899513c6d -
Trigger Event:
push
-
Statement type: