Python SDK for the hosted nyfin NYSE finance data API.
Project description
nyfin
Python SDK for the hosted nyfin NYSE financial data API.
The hosted API exposes 12 anonymous-readable NYSE endpoints (quote, screener, corporate actions, dividends, ETF data, regulatory compliance, search) behind a cached, typed REST surface. Not affiliated with, endorsed by, or sponsored by NYSE, Inc. or ETF Central.
Install
pip install nyfin
Quick start
from nyfin import Client
client = Client()
# Quote snapshot — full quote, history, board, totals, options, trends
ibm = client.quote("IBM")
# Symbol → canonical row resolver
canonical = client.quote_resolve("IBM", mic_code="XNYS")
# Paginated screener by instrument type
equities = client.quote_screener("EQUITY", page=1, page_size=25)
# Corporate actions feed (date-ranged, paginated)
actions = client.corporate_actions("2026-04-01", "2026-12-31", page=1, page_size=50)
# Dividend ex-dates from NYSE Listing Manager
divs = client.dividends_ex_dates()
# ETF Central
spy_quote = client.etf_quote("SPY")
spy_price = client.etf_price("SPY")
popular = client.etf_most_popular()
state = client.etf_market_state()
# Regulatory
noncompliant = client.noncompliant_directory(market="NYSE", page_size=25)
status = client.noncompliant_lookup("ALUR")
# Site search
results = client.search("IBM", collection="nyse_quotes")
Every response is a {data, meta} envelope:
{
"data": {...}, # endpoint payload
"meta": {
"endpoint_id": "nyse.quote.snapshot",
"served_from": "origin", # or "cache" / "stale"
"cached_at": "2026-05-05T20:00:00.000Z",
"ttl_seconds": 15,
"stale_seconds": 30,
"version": "0.1.0"
}
}
Module-level convenience
import nyfin
quote = nyfin.quote("IBM")
divs = nyfin.dividends_ex_dates()
results = nyfin.search("IBM")
Methods
| Method | Endpoint | Purpose |
|---|---|---|
Client.quote(symbol) |
/v1/quote |
Full quote snapshot for a NYSE symbol |
Client.quote_resolve(symbol, mic_code) |
POST /v1/quote/resolve |
Resolve normalized ticker → canonical row |
Client.quote_screener(instrument_type, ...) |
POST /v1/quote/screener |
Paginated directory by instrument type |
Client.corporate_actions(from_date, to_date, ...) |
/v1/corporate-actions |
Corporate actions feed |
Client.dividends_ex_dates() |
/v1/dividends/ex-dates |
Upcoming dividend ex-dates |
Client.etf_quote(symbol) |
/v1/etf/quote |
ETF quote (ETF Central) |
Client.etf_price(symbol) |
/v1/etf/price |
ETF price (ETF Central) |
Client.etf_most_popular() |
/v1/etf/most-popular |
Curated most-popular ETFs |
Client.etf_market_state() |
/v1/etf/market-state |
State-of-the-market commentary |
Client.noncompliant_directory(...) |
/v1/regulatory/noncompliant |
Noncompliant-issuer directory |
Client.noncompliant_lookup(symbol) |
/v1/regulatory/noncompliant/{symbol} |
Per-symbol compliance lookup |
Client.search(q, collection, page) |
/v1/search |
Site search across NYSE.com |
Client.endpoints() |
/v1/endpoints |
List of public endpoints |
Client.openapi() |
/v1/openapi.json |
OpenAPI 3.1 specification |
Client.health() |
/v1/health |
Service health |
Required instrument_type values for quote_screener: EQUITY, INDEX, WARRANT, RIGHT, CLOSED_END_FUND, REIT, UNIT, TRUST. Other values are rejected with a 400.
Required collection values for search: nyse_quotes, nyse_pages_cms2, nyse_uploadedfiles, nyse_appurls.
Configuration
| Env var | Effect |
|---|---|
NYFIN_BASE_URL |
Override the API base URL (default https://api.nyfin.bluedoor.sh) |
NYFIN_CONTACT |
Sent as X-Nyfin-Contact for higher rate-limit tiers (v0.2.0+) |
NYFIN_API_KEY |
Sent as Authorization: Bearer for the API-key tier (v0.2.0+) |
client = Client(base_url="...", contact="you@example.com", timeout=20.0)
Errors
from nyfin import NyfinError, NyfinRateLimitError, NyfinValidationError
try:
client.quote_screener("BANANA") # not in enum
except NyfinValidationError as e:
print(e) # HTTP 400: 'instrument_type' must be one of [...]
try:
# ... heavy concurrent calls ...
except NyfinRateLimitError as e:
print(e) # HTTP 429: rate limited
What's NOT in v0.1.0
- No raw passthrough. The hosted API only exposes the friendly typed routes above.
- No identity-tier rate limiting.
X-Nyfin-ContactandAuthorizationare accepted as forward-compat headers but not enforced server-side in v0.1.0. - 5 ETF Central WAF-gated endpoints (
data-api/funds/{symbol},data-api/nyse/mapping/{symbol}, segment search) — planned for v0.2.0 with the necessary WAF warmup infrastructure. - TOP API + Market Event Feed — credentialed-only NYSE programs; out of v0.1.0 anonymous scope.
Disclaimer
This is an unofficial wrapper around publicly-readable NYSE.com and ETF Central JSON endpoints. NYSE, Inc., Intercontinental Exchange, and ETF Central LLC are not affiliated with this project. Use at your own risk and within those services' Terms of Service. The hosted API is provided as a courtesy without uptime guarantees.
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 nyfin-0.1.0.tar.gz.
File metadata
- Download URL: nyfin-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
599ec7b352b0ae15d3ea06295b4424ba185137070e7e1cbad2374b2dab5e6c54
|
|
| MD5 |
54c668a21c1bda4d72f40eee79273300
|
|
| BLAKE2b-256 |
7726e8f7f786d61d8f44c01f69fa55fdca7c875bc86af9a0da9b86cdc6f4e951
|
Provenance
The following attestation bundles were made for nyfin-0.1.0.tar.gz:
Publisher:
publish-nyfin-python.yml on bluedoor-ai/nyfin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nyfin-0.1.0.tar.gz -
Subject digest:
599ec7b352b0ae15d3ea06295b4424ba185137070e7e1cbad2374b2dab5e6c54 - Sigstore transparency entry: 1442616057
- Sigstore integration time:
-
Permalink:
bluedoor-ai/nyfin@967b00be8076ee8745d03453123406d0784ce482 -
Branch / Tag:
refs/tags/nyfin-python-v0.1.0 - Owner: https://github.com/bluedoor-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-nyfin-python.yml@967b00be8076ee8745d03453123406d0784ce482 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nyfin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nyfin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.4 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 |
f065301ca2586b66ba0498acde764f11fd3e5b317d44914c57197a2ac1b43de4
|
|
| MD5 |
893219d9f72928339872e61fde5fbeff
|
|
| BLAKE2b-256 |
f26d62cabbb2916c662caccbfd549db92a5100dda8de518005e7b32aa3d389c5
|
Provenance
The following attestation bundles were made for nyfin-0.1.0-py3-none-any.whl:
Publisher:
publish-nyfin-python.yml on bluedoor-ai/nyfin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nyfin-0.1.0-py3-none-any.whl -
Subject digest:
f065301ca2586b66ba0498acde764f11fd3e5b317d44914c57197a2ac1b43de4 - Sigstore transparency entry: 1442616204
- Sigstore integration time:
-
Permalink:
bluedoor-ai/nyfin@967b00be8076ee8745d03453123406d0784ce482 -
Branch / Tag:
refs/tags/nyfin-python-v0.1.0 - Owner: https://github.com/bluedoor-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-nyfin-python.yml@967b00be8076ee8745d03453123406d0784ce482 -
Trigger Event:
push
-
Statement type: