{"openapi":"3.1.0","info":{"title":"DollarLiquidity Public API","summary":"Real-time US dollar liquidity indicators, DLI regime scoring, and cross-asset correlations for AI agents and researchers.","description":"Free, unauthenticated, CORS-enabled JSON API. The /api/snapshot endpoint is the recommended single-call entry point for AI agents: one fetch returns site identity, current regime, every tracked indicator with latest value, recent blog posts, and an endpoint directory. Underlying series come from FRED, US Treasury Fiscal Data, and NY Fed Markets and are refreshed every 6 hours.","version":"1.1.0","contact":{"name":"DollarLiquidity.com","url":"https://dollarliquidity.com"},"license":{"name":"CC0 1.0 Universal (Public Domain Dedication)","url":"https://creativecommons.org/publicdomain/zero/1.0/"},"x-logo":{"url":"https://dollarliquidity.com/favicon-192x192.png"}},"servers":[{"url":"https://dollarliquidity.com"}],"paths":{"/api/snapshot":{"get":{"operationId":"getSnapshot","summary":"Single-fetch aggregate snapshot (recommended for AI agents)","description":"Returns site identity, current DLI regime, every tracked indicator with latest value, recent blog posts, the endpoint directory, and the partner-site graph in one response.","tags":["aggregate"],"responses":{"200":{"description":"Aggregate snapshot","content":{"application/json":{"schema":{"type":"object","required":["generatedAt","site","regime","indicators","apis"],"properties":{"$schema":{"type":"string"},"generatedAt":{"type":"string","format":"date-time"},"site":{"type":"object"},"regime":{"$ref":"#/components/schemas/Regime"},"indicators":{"type":"array","items":{"type":"object"}},"dliModel":{"type":"object"},"recentBlog":{"type":"array"},"keyPages":{"type":"array"},"machineReadable":{"type":"array"},"apis":{"type":"array"},"partnerSites":{"type":"array"}}}}}},"500":{"description":"Computation failed (code: snapshot_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/regime":{"get":{"operationId":"getRegime","summary":"Current DLI regime","description":"Returns the current US dollar liquidity regime: status (risk-on/neutral/risk-off), momentum, composite score, 5y percentile, top contributing drivers, indicator coverage, the data-as-of date, and the recompute timestamp.","tags":["regime"],"responses":{"200":{"description":"Regime state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Regime"}}}},"500":{"description":"Computation failed (code: regime_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/series/{id}":{"get":{"operationId":"getSeries","summary":"Historical time series for one indicator","description":"Daily time series for one of the 25 tracked indicators, plus metadata. Sorted ascending by date.","tags":["series"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","enum":["tga","fed-balance-sheet","onrrp","sofr-iorb","srf","vix","hy-spread","real-yield-10y","dollar-index","bank-cash-buffer","net-liquidity","reserve-buffer","bank-reserves","fed-swap-lines","fima-repo-facility","foreign-repo-pool","cp-tbill-spread","foreign-treasury-holdings","ecb-balance-sheet","boj-balance-sheet","m2","national-debt","federal-interest-payments","federal-deficit","debt-to-gdp"]}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":4000,"default":365},"description":"Trailing window in days."}],"responses":{"200":{"description":"Time series","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"array","items":{"type":"object","required":["date","value"],"properties":{"date":{"type":"string","format":"date"},"value":{"type":"number"},"zScore":{"type":"number"}}}},"meta":{"type":"object"}}}}}},"404":{"description":"Unknown series id (code: unknown_series).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/correlation":{"get":{"operationId":"getCorrelation","summary":"DLI vs. asset cross-correlations and lead/lag","description":"Returns rolling correlations, lead/lag analysis, and a simple backtest of DLI signal against major assets (SPX, QQQ, BTC, gold).","tags":["analytics"],"responses":{"200":{"description":"Correlation + lead/lag analytics","content":{"application/json":{"schema":{"type":"object","properties":{"updatedAt":{"type":"string","format":"date-time"},"correlations":{"type":"object"},"leadLag":{"type":"object"},"backtest":{"type":"object"}}}}}},"500":{"description":"Computation failed (code: correlation_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/history":{"get":{"operationId":"getHistory","summary":"DLI headline history","description":"The DLI 0-100 headline as a daily series, plus the component sub-indices.","tags":["regime"],"responses":{"200":{"description":"History series","content":{"application/json":{"schema":{"type":"object"}}}},"500":{"description":"Computation failed (code: history_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api":{"get":{"operationId":"getDirectory","summary":"Endpoint directory","description":"Lists every public endpoint, the error envelope, and discovery URLs.","tags":["meta"],"responses":{"200":{"description":"Directory","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/{path}":{"get":{"operationId":"unknownEndpoint","summary":"Any other /api path","description":"Unknown endpoints return the JSON error envelope, never an HTML page.","tags":["meta"],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"No endpoint at this path (code: endpoint_not_found).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Regime":{"type":"object","required":["status","compositeScore","percentile5y","coverage","updatedAt"],"properties":{"status":{"type":"string","enum":["risk-on","neutral","risk-off"]},"momentum":{"type":"string","enum":["improving","stable","deteriorating"]},"confidence":{"type":"string","enum":["high","medium","low"]},"compositeScore":{"type":"number","description":"Legacy sign-aligned composite, roughly [-1, +1]."},"previousScore":{"type":"number"},"percentile5y":{"type":"integer","minimum":0,"maximum":100,"description":"0-100 headline: trailing-5y rolling percentile of the composite."},"drivers":{"type":"array","items":{"type":"object"}},"coverage":{"type":"object","description":"Groups and indicators that actually fed the score.","properties":{"groups":{"type":"integer"},"totalGroups":{"type":"integer"},"indicators":{"type":"integer"},"totalIndicators":{"type":"integer"}}},"dataAsOf":{"type":"string","format":"date","description":"ISO date of the latest data the score reflects — distinct from updatedAt."},"updatedAt":{"type":"string","format":"date-time","description":"Recompute time, not a data date."}}},"Error":{"type":"object","required":["error","status"],"description":"Every non-2xx response from /api/* uses this envelope.","properties":{"error":{"type":"object","required":["code","message","hint","docs"],"properties":{"code":{"type":"string","description":"Stable machine identifier, snake_case (e.g. unknown_series, endpoint_not_found)."},"message":{"type":"string","description":"What happened."},"hint":{"type":"string","description":"What to do about it."},"docs":{"type":"string","format":"uri"}}},"status":{"type":"integer"}}}}},"externalDocs":{"description":"DollarLiquidity API documentation","url":"https://dollarliquidity.com/en/api-docs"}}