Unbnd logoUnbnd

Finance REST API

Grouped like the finance sidebar: stocks (index snapshot + TASI feed under /api/finance/stock/tasi/… matching /finance/stock/tasi), funds (per-symbol /api/finance/fund/:symbol/… matching /finance/fund/:symbol), precious metals (XAUUSD via /api/finance/fund/XAUUSD/ohlcv/… + Turso eastmoney-precious-spot).

StocksMarket index & listed companies

These are stock-market series (指数与成分). Canonical TASI feed URLs mirror the web app route /finance/stock/tasi — use /api/finance/stock/tasi/… (same slug as the UI). Only TASI is wired for that feed; other markets → /api/finance/stock/summary?market=…. Legacy /api/finance/market/… remains supported.

Index — latest snapshot (multi-market)

GET/api/finance/stock/summary

Envelope { code, message, data }: single → data.market + data.summary; batch → data.items. market=TASI (default) or S&P 500, Dow Jones, Nasdaq, … — latest snapshot (TASI from feed path; others from FMP where supported).

Index — daily series (exchange feed)

GET/api/finance/stock/tasi/summary/daily

No market= query — slug is in the path. No params = today index summary. date= single day; from + to = index K-line. Legacy: GET /api/finance/market/summary/daily?market=TASI.

GET/api/finance/stock/tasi/summary/daily/latest

Latest index session + asOf / dataDate. Legacy: GET /api/finance/market/summary/daily/latest.

GET/api/finance/stock/tasi/daily/latest

One call: latest summary + full items (companies) with shared asOf / dataDate.

Index — hourly buckets (exchange feed)

GET/api/finance/stock/tasi/summary/hourly

TASI only — SAHMK vs daily summary field alignment. SAHMK_API_KEY server-side. Legacy: GET /api/finance/market/summary/hourly?market=TASI.

Constituents — daily list & OHLC (exchange feed)

GET/api/finance/stock/tasi/company/daily

No extra params = today all companies. date=YYYY-MM-DD = that day. code + from + to = company K-line. Legacy: GET /api/finance/market/company/daily?market=TASI.

GET/api/finance/stock/tasi/company/daily/latest

Latest company list + asOf / dataDate. Legacy: GET /api/finance/market/company/daily/latest.

FundsSix-digit daily series

Six-digit catalog: two daily response families — exchange OHLCV (listed/traded) vs NAV disclosure (unit + daily %). Canonical paths mirror /finance/fund/:symbol (symbol in the URL). Multi-symbol batch remains on legacy /api/finance/market/daily?symbols=….

Traded fund / ETF — exchange daily bars (OHLCV)

GET/api/finance/fund/518880/ohlcv/daily

Replace 518880 with a six-digit code or XAUUSD. Query: startDate, endDate; optional withIndicators (legacy cold-start by default), indicatorWarmup (120 days), indicatorWarmupDays (35-250), syncIfEmpty, forceSync. Legacy: GET /api/finance/market/daily?symbols=….

GET/api/finance/fund/518880/ohlcv/daily/latest

Latest one OHLCV bar for that path symbol. Response { asOf, items, synced }. withIndicators defaults true (pass false, 0, no, or off to skip MACD streak); syncIfEmpty defaults true when omitted. Legacy: GET /api/finance/market/daily/latest?symbols=….

Fund NAV — disclosure daily series (unit + return %)

GET/api/finance/fund/012922/nav/daily

Replace 012922 with a configured NAV six-digit code. Query: startDate, endDate; optional syncIfEmpty. Legacy: GET /api/finance/fund/nav/daily?symbols=….

GET/api/finance/fund/012922/nav/daily/latest

Latest one NAV row for that path symbol. syncIfEmpty defaults true when omitted. Legacy: GET /api/finance/fund/nav/daily/latest?symbols=….

Funds / ETFs — latest bar + MACD (aggregated)

GET/api/finance/overview/stock-list

Required: symbols, startDate, endDate. Returns data.stockList (latest bar per symbol + MACD streak). Optional syncIfEmpty for allowlisted fund/ETF symbols.

Precious metalsSpot bullion (reserved)

Use GET /api/finance/fund/XAUUSD/ohlcv/daily (canonical; allowlisted for sync) or legacy GET /api/finance/market/daily?symbols=XAUUSD. Rows persist in Turso with source eastmoney-precious-spot (vs eastmoney for six-digit A-share/ETF kline, eastmoney-fund-nav for LSJZ NAV). Only XAUUSD in scope today.

Response example (company daily)

[{"code":"1120","name":"SNB","date":"2025-03-14","open":42.5,"high":43,"low":42.2,"lastPrice":42.8,"volume":1000000}]
Playground

Send requests and view responses.

RequestGET /api/finance/stock/tasi/company/daily

Finance REST demo — same paths as documented on the left.

Response
No response yet.