開發者
免費公開 API,無需認證。回傳 JSON 格式資料,含 Cache-Control 快取標頭。適用於個人專案、研究和內容創作。
取得當前流動性評分狀態,包含綜合評分、動能、信心度和關鍵驅動因素。
curl https://dollarliquidity.com/api/regime{
"status": "neutral",
"momentum": "stable",
"confidence": "high",
"compositeScore": 0.29,
"previousScore": 0.29,
"percentile5y": 42,
"coverage": { "groups": 4, "totalGroups": 4, "indicators": 9, "totalIndicators": 10 },
"dataAsOf": "2026-05-20",
"drivers": [
{
"indicatorId": "tga",
"weight": 0.325,
"zScore": 1.1,
"contribution": 0.239,
"direction": "tightening"
}
],
"updatedAt": "2026-05-22T15:33:33.647Z"
}percentile5y 是 0-100 的核心讀數(≥80 緊縮,≤20 寬鬆);compositeScore 是相容舊版的 [-1,+1] 形式。coverage 顯示實際參與計分的組與指標數。dataAsOf 是評分所反映的最新資料日期——updatedAt 只是重算的時間戳,不代表資料新鮮度。
Cache-Control: public, s-maxage=3600, stale-while-revalidate=21600
取得流動性透鏡目前快照:三條獨立軸(量、價、構),各自帶狀態與子讀數,加一個結構立場 × 戰術脈衝矩陣格。獨立於 /api/regime 的產品——從不折疊成一個分數。
curl "https://dollarliquidity.com/api/lens?lang=en"{
"quantity": {
"stance": "contracting",
"flow": -0.18,
"dial": 41,
"bufferPct": 11.2,
"bufferState": "thin",
"srfNonZeroShare90d": 0.03,
"realized": false,
"dataAsOf": "2026-08-26"
},
"price": {
"pathSpreadBps": 24,
"pathPricing": "neutral",
"realYieldPct": 1.92,
"realYieldTrendPp": 0.14,
"realYieldTrend": "rising",
"termPremiumPct": 0.34,
"termPremiumLevel": "normal",
"termPremiumTrendPp": -0.02,
"termPremiumTrend": "flat",
"curveContextBps": 48,
"dataAsOf": "2026-08-26"
},
"structure": {
"tgaFlow": 0.09,
"fiscalPulse": "draining",
"rrpBalanceB": 142.0,
"rrpBufferState": "depleted",
"billsShareContext": { "levelPct": 21.4, "direction6m": "rising" },
"fundingOverride": 0.12,
"dominantFundingLeg": null,
"cpTbillTiering": { "spreadBps": 14, "state": "normal", "trendBps": 2, "direction": "flat" },
"hyIgTiering": { "spreadBps": 118, "state": "normal", "trendBps": -3, "direction": "narrowing" },
"bankCashTiering": { "gapPp": 1.7, "state": "compressed", "trendPp": -0.5, "direction": "narrowing" },
"dataAsOf": "2026-08-26"
},
"synthesis": {
"cell": { "posture": "tightening", "pulse": "draining" },
"narrative": "…",
"dataAsOf": "2026-08-26"
},
"dataAsOf": "2026-08-26",
"updatedAt": "2026-08-27T06:00:11.203Z"
}選填參數 ?lang=(en/zh/zh-Hant/ja/ko/es/fr/de,預設 en)只決定 synthesis.narrative 用哪種語言——其餘欄位與語言無關。任何欄位在底層序列還沒熱身時都誠實回傳 null,不會用假的中性值填充。
Cache-Control: public, s-maxage=21600, stale-while-revalidate=86400
取得某個指標的時間序列資料,包含 z-score、百分位和中繼資料。
tga, fed-balance-sheet, onrrp, vix, hy-spread, real-yield-10y, dollar-index, sofr-iorb, srf, bank-cash-buffer, net-liquidity, m2
| 參數 | 型別 | 說明 |
|---|---|---|
days | number | 天數(預設 365,最大 4000) |
curl "https://dollarliquidity.com/api/series/tga?days=90"{
"data": [
{ "date": "2026-04-20", "value": 1038.0, "zScore": 1.71 },
{ "date": "2026-05-20", "value": 782.0, "zScore": 0.98 }
],
"meta": {
"lastAvailableDate": "2026-05-20",
"zScoreMean": 441.14,
"zScoreStd": 349.53,
"percentile": 73,
"source": "fresh"
}
}data 按日期升冪排列——data[0] 是最早的點,最新值取 data[data.length − 1]。
取得流動性評分與風險資產(BTC、SPX、QQQ、GOLD)之間的滾動相關性、領先-落後分析和評分回測資料。
curl https://dollarliquidity.com/api/correlationCache-Control: public, s-maxage=900, stale-while-revalidate=1800
import requests
regime = requests.get("https://dollarliquidity.com/api/regime").json()
print(f"Status: {regime['status']}, Score: P{regime['percentile5y']}/100")
tga = requests.get("https://dollarliquidity.com/api/series/tga?days=30").json()
latest = tga["data"][-1] # data is ascending — the last element is newest
print(f"TGA: {latest['value']}B (z-score: {latest['zScore']})")const regime = await fetch("https://dollarliquidity.com/api/regime")
.then(r => r.json());
console.log(`Status: ${regime.status}, Score: P${regime.percentile5y}/100`);
const tga = await fetch("https://dollarliquidity.com/api/series/tga?days=30")
.then(r => r.json());
const latest = tga.data[tga.data.length - 1]; // ascending — last is newest
console.log(`TGA: ${latest.value}B`);所有錯誤都是同一結構的 JSON:`{ "error": { "code", "message", "hint", "docs" }, "status" }`。`code` 穩定且可供程式辨識(如 `unknown_series`、`endpoint_not_found`),`hint` 說明下一步怎麼做。未知的 `/api/*` 路徑以同樣的結構回傳 404,不會回傳 HTML 頁面。
{
"error": {
"code": "unknown_series",
"message": "Unknown series id "foo".",
"hint": "Valid ids: tga, fed-balance-sheet, … GET https://dollarliquidity.com/api lists every endpoint.",
"docs": "https://dollarliquidity.com/en/api-docs"
},
"status": 404
}端點目錄在 `/api`。OpenAPI 3.1 在 `/openapi.json`(別名 `/.well-known/openapi.json`),RFC 9727 API 目錄在 `/.well-known/api-catalog`,網站索引在 `/llms.txt`。每個頁面也提供 Markdown:傳送 `Accept: text/markdown`,或在路徑末尾加上 `.md`。