> ## Documentation Index
> Fetch the complete documentation index at: https://docs.darvas.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs cover the Darvas financial data API, its MCP server, data API and Darvas Pro+ webhooks, and Pine Script custom indicators for Darvas charts.
> https://docs.darvas.app/llms.txt lists every indexed page with a summary, and https://docs.darvas.app/llms-full.txt holds them in one file. Add .md to any page URL to read that page as Markdown. The lookup lists of tickers, types and series are named at https://docs.darvas.app/ai-agents.
> The docs MCP server https://docs.darvas.app/mcp searches and reads these docs. It needs no key.
> Call the REST API at https://api.darvas.app/v1. Send the API key, which starts with dvk_, in the X-API-KEY header or as Authorization: Bearer. The OpenAPI 3.1 spec of all 168 operations is https://docs.darvas.app/openapi.yaml.
> Name a company by ticker or cik. A share class takes a dot or a dash, so BRK.B and BRK-B name the same shares. Dates are YYYY-MM-DD.
> A list answer holds one page. Request its next_page_url as it is until the answer has none. limit counts rows across all pages.
> Errors are JSON with a stable error code and a message: 400 VALIDATION_ERROR, 401 UNAUTHORIZED, 403 PLAN_REQUIRED, 404 NOT_FOUND, 429 RATE_LIMITED or QUOTA_EXCEEDED, 500 INTERNAL_ERROR and 503 UNAVAILABLE. On a 429, wait the seconds in Retry-After. 1 credit = 1 successful call: a 2xx answer with data costs one credit however many rows it holds (at most 1,000 a page), and empty answers, errors and FINRA /short-volume cost 0 credits.
> The Financial Data MCP server is https://api.darvas.app/mcp (Streamable HTTP, protocol 2025-11-25, the same API key in X-API-KEY or as a Bearer token). tools/list answers 8 flagship tools plus search_data_tools and call_data_tool by default; ?mode=full lists all 164 tools and ?toolsets=sec,crypto,macro lists domains. Every tool is callable by name, takes response_format (json, compact or tsv) and fields, and a list answer's cursor value goes in the cursor argument. The darvas://catalog/* resources cost 0 credits. Setup for each client is at https://docs.darvas.app/mcp-server.
> The data API covers SEC filers and their filings, statements, XBRL facts, debt maturities, ownership and earnings, US stock prices, technicals and FINRA short volume, macro series and a global economic calendar.
> Its crypto data covers prices, indices, order books, order flow, volume profiles, derivatives, options, liquidations, spot ETF flows and a screener across 9 exchanges. It also covers DeFi protocols, stablecoins, yields and DEX pairs, and Polymarket, Kalshi and OKX prediction markets. https://docs.darvas.app/market-coverage gives the history and update time of each dataset.
> https://docs.darvas.app/ai-agents names the endpoint and the MCP tool that answer each kind of question about these datasets.
> Custom indicators for Darvas charts are Pine Script v5 or v6 indicator() or strategy() scripts. Darvas rewrites Pine v1 to v4 to v5 and runs no other indicator language. Start at https://docs.darvas.app/pine-script/introduction.
> https://docs.darvas.app/pine-script/support lists the Pine Script that Darvas runs. https://docs.darvas.app/pine-script/request-security covers request.security() and request.financial(), and https://docs.darvas.app/pine-script/limits lists the run limits.
> Darvas Pro+ webhooks send a signed POST for alarm fires and pauses, scheduled answers, economic calendar alerts, ETF flow updates, ended connections and the data API events. https://docs.darvas.app/pro/webhooks lists every event, its object and how to verify the Darvas-Signature header.

# Fed Net Liquidity API: WALCL, TGA, RRP

> Track Fed net liquidity (total assets less the Treasury General Account and reverse repo) daily, with weekly changes, a regime label and SOFR and EFFR spreads.

## Overview

This endpoint tracks US dollar liquidity from the Federal Reserve's and the Treasury's own releases. It combines the Fed's weekly balance sheet (total assets, securities held outright and reserve balances) with the daily Treasury General Account and the daily overnight reverse repo, and derives Fed net liquidity as total assets less the TGA and reverse repo, with its 1-week and 4-week changes and a regime label.

`reference_rates` gives the overnight rates SOFR, EFFR, OBFR, TGCR and BGCR with the spreads that show funding stress. `history` aligns every series by day.

| Coverage | Details |
| - | - |
| Series | Fed total assets, securities held, reserves, TGA, overnight reverse repo and net liquidity |
| Rates | SOFR, EFFR, OBFR, TGCR and BGCR |
| History | 1 to 365 trailing days; 30 by default |
| MCP tool | `get_macro_liquidity` on the [data API MCP server](https://docs.darvas.app/mcp-server.md) |

## Example

```python theme={null}
import os
import requests

headers = {"X-API-KEY": os.environ["DARVAS_API_KEY"]}
answer = requests.get(
    "https://api.darvas.app/v1/macro/liquidity",
    headers=headers,
    params={
        "days": 90,
    },
).json()
print(answer["snapshot"])
print(answer["reference_rates"])
print(len(answer["history"]), "days")
```

```bash theme={null}
curl -H "X-API-KEY: $DARVAS_API_KEY" \
  "https://api.darvas.app/v1/macro/liquidity?days=90"
```


## OpenAPI

````yaml openapi.yaml GET /macro/liquidity
openapi: 3.1.1
info:
  title: Darvas Data API
  version: 0.9.0
  summary: >-
    Company, filing, insider, institutional, market and macro data for every SEC
    filer, US stocks, UK and French companies and crypto markets.
  description: >-
    Every value names its source. Field names follow the common financial data
    API shapes, so an existing client reads these answers unchanged; extra
    fields come after them. Send the API key in the X-API-KEY header or as a
    Bearer token. Dates are ISO 8601 and times are RFC 3339 in UTC. Billing: 1
    credit = 1 successful call. A page holds at most 1,000 rows and costs one
    credit however many it holds; an empty answer, a refusal, an error and every
    FINRA /short-volume call cost 0 credits.
  termsOfService: https://darvas.app/terms
  contact:
    name: Darvas data
    url: https://darvas.app
    email: support@darvas.app
  license:
    name: Proprietary
    identifier: LicenseRef-Darvas-Proprietary
servers:
  - url: https://api.darvas.app/v1
    description: Production.
  - url: https://darvas.app/api/data/v1
    description: Production, on the darvas.app host.
security:
  - apiKey: []
  - bearerKey: []
tags:
  - name: company
    description: Company profiles from SEC submissions.
  - name: crypto
    description: >-
      Candles, trades, order books, order flow, derivatives, options, screens
      and market structure of crypto instruments from Darvas's own market data.
  - name: defi
    description: >-
      Multi-chain DeFi protocol TVL, stablecoin supply, yield pools, and
      on-chain DEX liquidity.
  - name: earnings
    description: >-
      Each filing that reports a period, the 8-K earnings release, then the 10-Q
      or 10-K, and the KPIs, guidance and non-GAAP metrics of the releases.
  - name: filings
    description: >-
      SEC filing lists, the items of 10-K, 10-Q and 8-K filings, and search over
      them.
  - name: financials
    description: >-
      Standardized income statements, balance sheets and cash flow statements
      from XBRL filings.
  - name: funds
    description: Holdings of registered funds and ETFs from Form N-PORT.
  - name: insiders
    description: >-
      Insider trades and holdings from Forms 3, 4 and 5, and sale notices from
      Form 144.
  - name: institutions
    description: Positions of investment managers from Form 13F reports.
  - name: ipos
    description: Registration statements and prospectuses of companies going public.
  - name: macro
    description: >-
      Policy rates, the Treasury yield curve, inflation, jobs and GDP from their
      publishers.
  - name: markets
    description: >-
      Market structure data: the shares that failed to settle each day, from
      SEC, and futures positions by trader group, from the CFTC.
  - name: news
    description: >-
      Company 8-K filings and the press releases of the Federal Reserve, the
      SEC, the BEA and the BLS.
  - name: ownership
    description: Owners of more than 5% from Schedules 13D and 13G.
  - name: prediction-markets
    description: >-
      Binary event contract odds and series across Polymarket, Kalshi and OKX
      plus cross-venue arbitrage spreads.
  - name: tokenized-stocks
    description: >-
      Coinbase stock tokens on Base, priced by their USDC pools, and the stock
      instruments of OKX and Bybit.
  - name: webhooks
    description: >-
      Destinations that receive a signed event when new filings, statements,
      insider forms or macro releases arrive.
externalDocs:
  description: Market coverage
  url: https://docs.darvas.app/market-coverage
paths:
  /macro/liquidity:
    get:
      tags:
        - macro
      summary: Get US and Federal Reserve net liquidity and overnight rates
      description: >-
        Combines Federal Reserve H.4.1 total assets (WALCL), SOMA holdings, and
        bank reserve balances with daily US Treasury General Account (TGA)
        balances, daily NY Fed Overnight Reverse Repo (ON RRP), derived Fed Net
        Liquidity (WALCL - TGA - ON RRP) with 1-week/4-week deltas and regime
        classification, and NY Fed overnight reference rates (SOFR, EFFR, OBFR,
        TGCR, BGCR) with funding-stress spreads.
      operationId: getMacroLiquidity
      parameters:
        - $ref: '#/components/parameters/MacroLiquidityDays'
        - $ref: '#/components/parameters/MacroLiquidityStartDate'
        - $ref: '#/components/parameters/MacroLiquidityEndDate'
        - $ref: '#/components/parameters/MacroLiquidityIncludeHistory'
      responses:
        '200':
          description: >-
            Get US and Federal Reserve net liquidity and overnight rates: one
            page.
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-Quota-Unit:
              $ref: '#/components/headers/QuotaUnit'
            X-Credits-Used:
              $ref: '#/components/headers/CreditsUsed'
            X-Quota-Limit:
              $ref: '#/components/headers/QuotaLimit'
            X-Quota-Remaining:
              $ref: '#/components/headers/QuotaRemaining'
            X-Quota-Reset:
              $ref: '#/components/headers/QuotaReset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroLiquidityResponse'
              example:
                as_of: '2026-11-27'
                fetched_at: '2026-11-30T00:00:00.000Z'
                stale_fallback: false
                snapshot:
                  as_of: '2026-11-27'
                  fed_total_assets_billions_usd: 6895.4
                  fed_total_assets_as_of: '2026-11-25'
                  fed_balance_sheet_basis: fed_h41_walcl
                  securities_held_outright_billions_usd: 6520.1
                  soma_treasuries_billions_usd: 4290.5
                  soma_mbs_billions_usd: 2229.6
                  reserve_balances_billions_usd: 3240.8
                  reserve_balances_as_of: '2026-11-25'
                  tga_billions_usd: 812.3
                  tga_as_of: '2026-11-27'
                  tga_source: us_treasury_dts
                  on_rrp_billions_usd: 145.6
                  on_rrp_as_of: '2026-11-27'
                  on_rrp_award_rate_pct: 4.55
                  on_rrp_counterparties_count: 42
                  on_rrp_source: ny_fed_rrp_results
                  net_liquidity_billions_usd: 5937.5
                  net_liquidity_change_1w_billions_usd: 42.1
                  net_liquidity_change_1w_pct: 0.71
                  net_liquidity_change_4w_billions_usd: 85.4
                  net_liquidity_change_4w_pct: 1.46
                  liquidity_regime: expanding
                reference_rates:
                  sofr:
                    rate_pct: 4.58
                    effective_date: '2026-11-27'
                    volume_billions_usd: 2140
                    percentile_1_pct: 4.5
                    percentile_25_pct: 4.55
                    percentile_75_pct: 4.62
                    percentile_99_pct: 4.72
                    target_from_pct: 4.5
                    target_to_pct: 4.75
                    avg_30d_pct: 4.59
                    avg_90d_pct: 4.71
                    avg_180d_pct: 4.95
                  effr:
                    rate_pct: 4.58
                    effective_date: '2026-11-27'
                    volume_billions_usd: 2140
                    percentile_1_pct: 4.5
                    percentile_25_pct: 4.55
                    percentile_75_pct: 4.62
                    percentile_99_pct: 4.72
                    target_from_pct: 4.5
                    target_to_pct: 4.75
                    avg_30d_pct: 4.59
                    avg_90d_pct: 4.71
                    avg_180d_pct: 4.95
                  obfr: null
                  tgcr: null
                  bgcr: null
                  spreads:
                    sofr_minus_effr_bps: 0
                    effr_minus_target_mid_bps: -4.5
                    sofr_minus_target_upper_bps: -17
                    obfr_minus_effr_bps: 0
                    funding_stress_flag: false
                history:
                  - date: '2026-11-27'
                    fed_total_assets_billions_usd: 6895.4
                    fed_total_assets_as_of: '2026-11-25'
                    tga_billions_usd: 812.3
                    tga_as_of: '2026-11-27'
                    on_rrp_billions_usd: 145.6
                    on_rrp_as_of: '2026-11-27'
                    net_liquidity_billions_usd: 5937.5
                    reserve_balances_billions_usd: 3240.8
                    sofr_pct: 4.58
                    effr_pct: 4.58
                    obfr_pct: 4.58
                    sofr_minus_effr_bps: 0
                count: 1
                source_status:
                  fed_h41: ok
                  treasury_tga: ok
                  ny_fed_rrp: ok
                  ny_fed_reference_rates: ok
                sources:
                  - id: federal_reserve_h41
                    name: Federal Reserve Board H.4.1 Statistical Release
                    url: https://www.federalreserve.gov/releases/h41/
                    series:
                      - RESPPMA_N.WW (WALCL Total Assets)
                    frequency: weekly_wednesday
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/PlanRequired'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    MacroLiquidityDays:
      name: days
      in: query
      required: false
      description: >-
        Trailing daily observations to include in history (1 to 365; default
        30).
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 365
        default: 30
      example: 30
    MacroLiquidityStartDate:
      name: start_date
      in: query
      required: false
      description: Optional inclusive lower date bound (YYYY-MM-DD) for history rows.
      schema:
        type: string
        format: date
        maxLength: 10
      example: '2026-10-01'
    MacroLiquidityEndDate:
      name: end_date
      in: query
      required: false
      description: Optional inclusive upper date bound (YYYY-MM-DD) for history rows.
      schema:
        type: string
        format: date
        maxLength: 10
      example: '2026-11-30'
    MacroLiquidityIncludeHistory:
      name: include_history
      in: query
      required: false
      description: Whether to include the daily aligned history array (default true).
      schema:
        type: string
        enum:
          - 'true'
          - 'false'
        default: 'true'
      example: 'true'
  headers:
    RateLimitLimit:
      description: Requests per minute the key may send; on a 401 the limit a new key gets.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 6000
      example: 60
    QuotaUnit:
      description: >-
        What the quota counts: credits. One credit is one successful call that
        returns data.
      schema:
        type: string
        enum:
          - credits
        maxLength: 7
      example: credits
    CreditsUsed:
      description: >-
        Credits this answer cost: one for a 2xx answer with data, however many
        rows it holds. An empty answer, a refusal, an error and a FINRA
        /short-volume answer cost 0.
      schema:
        type: integer
        format: int64
        minimum: 0
        maximum: 9007199254740991
      example: 1
    QuotaLimit:
      description: >-
        The plan's credits for its period plus the account's pay-as-you-go
        credit balance, as the request found them.
      schema:
        type: integer
        format: int64
        minimum: 0
        maximum: 9007199254740991
      example: 2500000
    QuotaRemaining:
      description: >-
        Credits left after this answer: the plan's own first, then the credit
        balance.
      schema:
        type: integer
        format: int64
        minimum: 0
        maximum: 9007199254740991
      example: 2499999
    QuotaReset:
      description: >-
        When the plan's credits start again, or the trial ends, in seconds since
        1970 (UTC). Pay-as-you-go answers leave it out: their credits never
        expire.
      schema:
        type: integer
        format: int64
        minimum: 0
        maximum: 4102444800
      example: 1767225600
    RetryAfter:
      description: Seconds to wait before the next request.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 60
      example: 1
  schemas:
    MacroLiquidityResponse:
      type: object
      description: The answer of GET /macro/liquidity.
      additionalProperties: false
      required:
        - fetched_at
        - stale_fallback
        - snapshot
        - reference_rates
        - history
        - count
        - source_status
      properties:
        as_of:
          type:
            - string
            - 'null'
          format: date
          description: Latest observation date.
          examples:
            - '2026-11-27'
        fetched_at:
          type: string
          format: date-time
          description: UTC timestamp when feeds were fetched.
          examples:
            - '2026-11-30T00:00:00.000Z'
        stale_fallback:
          type: boolean
          description: True when served from stale cache due to upstream outage.
          examples:
            - false
        snapshot:
          $ref: '#/components/schemas/MacroLiquiditySnapshot'
        reference_rates:
          type: object
          description: Latest NY Fed overnight reference rates and derived spreads.
          additionalProperties: false
          required:
            - sofr
            - effr
            - obfr
            - tgcr
            - bgcr
            - spreads
          properties:
            sofr:
              oneOf:
                - $ref: '#/components/schemas/MacroReferenceRate'
                - type: 'null'
            effr:
              oneOf:
                - $ref: '#/components/schemas/MacroReferenceRate'
                - type: 'null'
            obfr:
              oneOf:
                - $ref: '#/components/schemas/MacroReferenceRate'
                - type: 'null'
            tgcr:
              oneOf:
                - $ref: '#/components/schemas/MacroReferenceRate'
                - type: 'null'
            bgcr:
              oneOf:
                - $ref: '#/components/schemas/MacroReferenceRate'
                - type: 'null'
            spreads:
              $ref: '#/components/schemas/MacroOvernightSpreads'
          examples:
            - sofr:
                rate_pct: 4.58
                effective_date: '2026-11-27'
                volume_billions_usd: 2140
                percentile_1_pct: 4.5
                percentile_25_pct: 4.55
                percentile_75_pct: 4.62
                percentile_99_pct: 4.72
                target_from_pct: 4.5
                target_to_pct: 4.75
                avg_30d_pct: 4.59
                avg_90d_pct: 4.71
                avg_180d_pct: 4.95
              effr:
                rate_pct: 4.58
                effective_date: '2026-11-27'
                volume_billions_usd: 2140
                percentile_1_pct: 4.5
                percentile_25_pct: 4.55
                percentile_75_pct: 4.62
                percentile_99_pct: 4.72
                target_from_pct: 4.5
                target_to_pct: 4.75
                avg_30d_pct: 4.59
                avg_90d_pct: 4.71
                avg_180d_pct: 4.95
              obfr: null
              tgcr: null
              bgcr: null
              spreads:
                sofr_minus_effr_bps: 0
                effr_minus_target_mid_bps: -4.5
                sofr_minus_target_upper_bps: -17
                obfr_minus_effr_bps: 0
                funding_stress_flag: false
        history:
          type: array
          maxItems: 365
          description: Aligned daily liquidity history.
          items:
            $ref: '#/components/schemas/MacroLiquidityHistoryRow'
        count:
          type: integer
          format: int32
          minimum: 0
          maximum: 365
          description: Number of daily history rows returned.
          examples:
            - 30
        source_status:
          type: object
          description: Live feed status for each primary government endpoint.
          additionalProperties: false
          required:
            - fed_h41
            - treasury_tga
            - ny_fed_rrp
            - ny_fed_reference_rates
          properties:
            fed_h41:
              type: string
              enum:
                - ok
                - fallback
                - unavailable
              description: Fed H.4.1 status.
              examples:
                - ok
            treasury_tga:
              type: string
              enum:
                - ok
                - fallback
                - unavailable
              description: Treasury DTS TGA status.
              examples:
                - ok
            ny_fed_rrp:
              type: string
              enum:
                - ok
                - fallback
                - unavailable
              description: NY Fed ON RRP status.
              examples:
                - ok
            ny_fed_reference_rates:
              type: string
              enum:
                - ok
                - fallback
                - unavailable
              description: NY Fed overnight rates status.
              examples:
                - ok
          examples:
            - fed_h41: ok
              treasury_tga: ok
              ny_fed_rrp: ok
              ny_fed_reference_rates: ok
        methodology:
          type: string
          pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
          maxLength: 1500
          description: Net Liquidity formula and spread methodology.
          examples:
            - >-
              Fed Net Liquidity equals WALCL minus TGA minus ON RRP in billions
              of USD.
        sources:
          type: array
          maxItems: 10
          description: Primary US government source metadata.
          items:
            $ref: '#/components/schemas/MacroLiquiditySource'
      examples:
        - as_of: '2026-11-27'
          fetched_at: '2026-11-30T00:00:00.000Z'
          stale_fallback: false
          snapshot:
            as_of: '2026-11-27'
            fed_total_assets_billions_usd: 6895.4
            fed_total_assets_as_of: '2026-11-25'
            fed_balance_sheet_basis: fed_h41_walcl
            securities_held_outright_billions_usd: 6520.1
            soma_treasuries_billions_usd: 4290.5
            soma_mbs_billions_usd: 2229.6
            reserve_balances_billions_usd: 3240.8
            reserve_balances_as_of: '2026-11-25'
            tga_billions_usd: 812.3
            tga_as_of: '2026-11-27'
            tga_source: us_treasury_dts
            on_rrp_billions_usd: 145.6
            on_rrp_as_of: '2026-11-27'
            on_rrp_award_rate_pct: 4.55
            on_rrp_counterparties_count: 42
            on_rrp_source: ny_fed_rrp_results
            net_liquidity_billions_usd: 5937.5
            net_liquidity_change_1w_billions_usd: 42.1
            net_liquidity_change_1w_pct: 0.71
            net_liquidity_change_4w_billions_usd: 85.4
            net_liquidity_change_4w_pct: 1.46
            liquidity_regime: expanding
          reference_rates:
            sofr:
              rate_pct: 4.58
              effective_date: '2026-11-27'
              volume_billions_usd: 2140
              percentile_1_pct: 4.5
              percentile_25_pct: 4.55
              percentile_75_pct: 4.62
              percentile_99_pct: 4.72
              target_from_pct: 4.5
              target_to_pct: 4.75
              avg_30d_pct: 4.59
              avg_90d_pct: 4.71
              avg_180d_pct: 4.95
            effr:
              rate_pct: 4.58
              effective_date: '2026-11-27'
              volume_billions_usd: 2140
              percentile_1_pct: 4.5
              percentile_25_pct: 4.55
              percentile_75_pct: 4.62
              percentile_99_pct: 4.72
              target_from_pct: 4.5
              target_to_pct: 4.75
              avg_30d_pct: 4.59
              avg_90d_pct: 4.71
              avg_180d_pct: 4.95
            obfr: null
            tgcr: null
            bgcr: null
            spreads:
              sofr_minus_effr_bps: 0
              effr_minus_target_mid_bps: -4.5
              sofr_minus_target_upper_bps: -17
              obfr_minus_effr_bps: 0
              funding_stress_flag: false
          history:
            - date: '2026-11-27'
              fed_total_assets_billions_usd: 6895.4
              fed_total_assets_as_of: '2026-11-25'
              tga_billions_usd: 812.3
              tga_as_of: '2026-11-27'
              on_rrp_billions_usd: 145.6
              on_rrp_as_of: '2026-11-27'
              net_liquidity_billions_usd: 5937.5
              reserve_balances_billions_usd: 3240.8
              sofr_pct: 4.58
              effr_pct: 4.58
              obfr_pct: 4.58
              sofr_minus_effr_bps: 0
          count: 1
          source_status:
            fed_h41: ok
            treasury_tga: ok
            ny_fed_rrp: ok
            ny_fed_reference_rates: ok
    MacroLiquiditySnapshot:
      type: object
      description: Latest US Federal Reserve net liquidity snapshot (billions of USD).
      additionalProperties: false
      required:
        - fed_balance_sheet_basis
        - tga_source
        - on_rrp_source
      properties:
        as_of:
          type:
            - string
            - 'null'
          format: date
          description: Latest component observation date.
          examples:
            - '2026-11-27'
        fed_total_assets_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: Fed H.4.1 WALCL total assets ($B).
          examples:
            - 6895.4
        fed_total_assets_as_of:
          type:
            - string
            - 'null'
          format: date
          description: As-of date of Fed total assets.
          examples:
            - '2026-11-25'
        fed_balance_sheet_basis:
          type: string
          enum:
            - fed_h41_walcl
            - fed_h41_factors_supplying_fallback
            - ny_fed_soma_fallback
            - unavailable
          description: Primary or fallback balance sheet source used.
          examples:
            - fed_h41_walcl
        securities_held_outright_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: SOMA securities held outright ($B).
          examples:
            - 6520.1
        soma_treasuries_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: SOMA US Treasury holdings ($B).
          examples:
            - 4290.5
        soma_mbs_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: SOMA agency MBS holdings ($B).
          examples:
            - 2229.6
        reserve_balances_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: Depository institution reserve balances ($B).
          examples:
            - 3240.8
        reserve_balances_as_of:
          type:
            - string
            - 'null'
          format: date
          description: As-of date of reserve balances.
          examples:
            - '2026-11-25'
        tga_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: Treasury General Account closing balance ($B).
          examples:
            - 812.3
        tga_as_of:
          type:
            - string
            - 'null'
          format: date
          description: As-of date of TGA balance.
          examples:
            - '2026-11-27'
        tga_source:
          type: string
          enum:
            - us_treasury_dts
            - fed_h41_fallback
            - unavailable
          description: TGA data feed used.
          examples:
            - us_treasury_dts
        on_rrp_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: NY Fed ON RRP accepted balance ($B).
          examples:
            - 145.6
        on_rrp_as_of:
          type:
            - string
            - 'null'
          format: date
          description: As-of date of ON RRP balance.
          examples:
            - '2026-11-27'
        on_rrp_award_rate_pct:
          type:
            - number
            - 'null'
          format: double
          description: ON RRP award rate (%).
          examples:
            - 4.55
        on_rrp_counterparties_count:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
          maximum: 1000
          description: Accepted ON RRP counterparties count.
          examples:
            - 42
        on_rrp_source:
          type: string
          enum:
            - ny_fed_rrp_results
            - ny_fed_rrp_propositions_fallback
            - fed_h41_fallback
            - unavailable
          description: ON RRP feed used.
          examples:
            - ny_fed_rrp_results
        net_liquidity_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: WALCL minus TGA minus ON RRP ($B).
          examples:
            - 5937.5
        net_liquidity_change_1w_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: 1-week change in net liquidity ($B).
          examples:
            - 42.1
        net_liquidity_change_1w_pct:
          type:
            - number
            - 'null'
          format: double
          description: 1-week percent change in net liquidity (%).
          examples:
            - 0.71
        net_liquidity_change_4w_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: 4-week change in net liquidity ($B).
          examples:
            - 85.4
        net_liquidity_change_4w_pct:
          type:
            - number
            - 'null'
          format: double
          description: 4-week percent change in net liquidity (%).
          examples:
            - 1.46
        liquidity_regime:
          type:
            - string
            - 'null'
          enum:
            - expanding
            - contracting
            - neutral
            - null
          description: 4-week net liquidity impulse regime (+/- $25B threshold).
          examples:
            - expanding
      examples:
        - as_of: '2026-11-27'
          fed_total_assets_billions_usd: 6895.4
          fed_total_assets_as_of: '2026-11-25'
          fed_balance_sheet_basis: fed_h41_walcl
          securities_held_outright_billions_usd: 6520.1
          soma_treasuries_billions_usd: 4290.5
          soma_mbs_billions_usd: 2229.6
          reserve_balances_billions_usd: 3240.8
          reserve_balances_as_of: '2026-11-25'
          tga_billions_usd: 812.3
          tga_as_of: '2026-11-27'
          tga_source: us_treasury_dts
          on_rrp_billions_usd: 145.6
          on_rrp_as_of: '2026-11-27'
          on_rrp_award_rate_pct: 4.55
          on_rrp_counterparties_count: 42
          on_rrp_source: ny_fed_rrp_results
          net_liquidity_billions_usd: 5937.5
          net_liquidity_change_1w_billions_usd: 42.1
          net_liquidity_change_1w_pct: 0.71
          net_liquidity_change_4w_billions_usd: 85.4
          net_liquidity_change_4w_pct: 1.46
          liquidity_regime: expanding
    MacroReferenceRate:
      type: object
      description: Latest NY Fed overnight reference rate observation.
      additionalProperties: false
      required:
        - rate_pct
        - effective_date
      properties:
        rate_pct:
          type:
            - number
            - 'null'
          format: double
          description: Volume-weighted median rate in percent.
          examples:
            - 4.58
        effective_date:
          type: string
          format: date
          description: Effective business date of the rate.
          examples:
            - '2026-11-27'
        volume_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: Underlying transaction volume in billions of USD.
          examples:
            - 2140
        percentile_1_pct:
          type:
            - number
            - 'null'
          format: double
          description: 1st percentile rate (%).
          examples:
            - 4.5
        percentile_25_pct:
          type:
            - number
            - 'null'
          format: double
          description: 25th percentile rate (%).
          examples:
            - 4.55
        percentile_75_pct:
          type:
            - number
            - 'null'
          format: double
          description: 75th percentile rate (%).
          examples:
            - 4.62
        percentile_99_pct:
          type:
            - number
            - 'null'
          format: double
          description: 99th percentile rate (%).
          examples:
            - 4.72
        target_from_pct:
          type:
            - number
            - 'null'
          format: double
          description: FOMC target range lower bound (%).
          examples:
            - 4.5
        target_to_pct:
          type:
            - number
            - 'null'
          format: double
          description: FOMC target range upper bound (%).
          examples:
            - 4.75
        avg_30d_pct:
          type:
            - number
            - 'null'
          format: double
          description: 30-day compounded SOFR average (%).
          examples:
            - 4.59
        avg_90d_pct:
          type:
            - number
            - 'null'
          format: double
          description: 90-day compounded SOFR average (%).
          examples:
            - 4.71
        avg_180d_pct:
          type:
            - number
            - 'null'
          format: double
          description: 180-day compounded SOFR average (%).
          examples:
            - 4.95
      examples:
        - rate_pct: 4.58
          effective_date: '2026-11-27'
          volume_billions_usd: 2140
          percentile_1_pct: 4.5
          percentile_25_pct: 4.55
          percentile_75_pct: 4.62
          percentile_99_pct: 4.72
          target_from_pct: 4.5
          target_to_pct: 4.75
          avg_30d_pct: 4.59
          avg_90d_pct: 4.71
          avg_180d_pct: 4.95
    MacroOvernightSpreads:
      type: object
      description: Overnight money market funding spreads in basis points.
      additionalProperties: false
      required:
        - funding_stress_flag
      properties:
        sofr_minus_effr_bps:
          type:
            - number
            - 'null'
          format: double
          description: SOFR minus EFFR in basis points.
          examples:
            - 0
        effr_minus_target_mid_bps:
          type:
            - number
            - 'null'
          format: double
          description: EFFR minus FOMC target midpoint in bps.
          examples:
            - -4.5
        sofr_minus_target_upper_bps:
          type:
            - number
            - 'null'
          format: double
          description: SOFR minus FOMC target upper bound in bps.
          examples:
            - -17
        obfr_minus_effr_bps:
          type:
            - number
            - 'null'
          format: double
          description: OBFR minus EFFR in basis points.
          examples:
            - 0
        funding_stress_flag:
          type: boolean
          description: True when SOFR exceeds EFFR by at least 15 bps.
          examples:
            - false
      examples:
        - sofr_minus_effr_bps: 0
          effr_minus_target_mid_bps: -4.5
          sofr_minus_target_upper_bps: -17
          obfr_minus_effr_bps: 0
          funding_stress_flag: false
    MacroLiquidityHistoryRow:
      type: object
      description: One aligned daily US liquidity observation.
      additionalProperties: false
      required:
        - date
      properties:
        date:
          type: string
          format: date
          description: Business day UTC.
          examples:
            - '2026-11-27'
        fed_total_assets_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: Carried-forward Fed total assets ($B).
          examples:
            - 6895.4
        fed_total_assets_as_of:
          type:
            - string
            - 'null'
          format: date
          description: As-of date of Fed balance sheet.
          examples:
            - '2026-11-25'
        tga_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: Treasury General Account balance ($B).
          examples:
            - 812.3
        tga_as_of:
          type:
            - string
            - 'null'
          format: date
          description: As-of date of TGA reading.
          examples:
            - '2026-11-27'
        on_rrp_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: NY Fed ON RRP accepted volume ($B).
          examples:
            - 145.6
        on_rrp_as_of:
          type:
            - string
            - 'null'
          format: date
          description: As-of date of ON RRP reading.
          examples:
            - '2026-11-27'
        net_liquidity_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: Net Liquidity = WALCL - TGA - ON RRP ($B).
          examples:
            - 5937.5
        reserve_balances_billions_usd:
          type:
            - number
            - 'null'
          format: double
          description: Reserve balances ($B).
          examples:
            - 3240.8
        sofr_pct:
          type:
            - number
            - 'null'
          format: double
          description: SOFR rate (%).
          examples:
            - 4.58
        effr_pct:
          type:
            - number
            - 'null'
          format: double
          description: EFFR rate (%).
          examples:
            - 4.58
        obfr_pct:
          type:
            - number
            - 'null'
          format: double
          description: OBFR rate (%).
          examples:
            - 4.58
        sofr_minus_effr_bps:
          type:
            - number
            - 'null'
          format: double
          description: SOFR minus EFFR spread (bps).
          examples:
            - 0
      examples:
        - date: '2026-11-27'
          fed_total_assets_billions_usd: 6895.4
          fed_total_assets_as_of: '2026-11-25'
          tga_billions_usd: 812.3
          tga_as_of: '2026-11-27'
          on_rrp_billions_usd: 145.6
          on_rrp_as_of: '2026-11-27'
          net_liquidity_billions_usd: 5937.5
          reserve_balances_billions_usd: 3240.8
          sofr_pct: 4.58
          effr_pct: 4.58
          obfr_pct: 4.58
          sofr_minus_effr_bps: 0
    MacroLiquiditySource:
      type: object
      description: Official US government liquidity data source metadata.
      additionalProperties: false
      required:
        - id
        - name
        - url
        - series
        - frequency
      properties:
        id: ff46c245-2567-44fb-83e7-2c89a899ee4e
        name:
          type: string
          pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
          maxLength: 160
          description: Official source title.
          examples:
            - Federal Reserve Board H.4.1 Statistical Release
        url:
          type: string
          format: uri
          maxLength: 500
          description: Official source URL.
          examples:
            - https://www.federalreserve.gov/releases/h41/
        notice:
          type: string
          pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
          maxLength: 300
          description: Required attribution notice when applicable.
          examples:
            - Published by the Federal Reserve Bank of New York.
        series:
          type: array
          maxItems: 20
          description: Series identifiers read from this source.
          items:
            type: string
            pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
            maxLength: 160
          examples:
            - - RESPPMA_N.WW (WALCL Total Assets)
        frequency:
          type: string
          pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
          maxLength: 40
          description: Publication cadence.
          examples:
            - weekly_wednesday
      examples:
        - id: federal_reserve_h41
          name: Federal Reserve Board H.4.1 Statistical Release
          url: https://www.federalreserve.gov/releases/h41/
          series:
            - RESPPMA_N.WW (WALCL Total Assets)
          frequency: weekly_wednesday
    Error:
      type: object
      description: A refusal or failure.
      additionalProperties: false
      required:
        - error
      properties:
        error:
          type: string
          pattern: ^[A-Z_]{1,64}$
          description: A stable code.
          examples:
            - NOT_FOUND
        message:
          type: string
          pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
          maxLength: 500
          description: What went wrong, in English.
          examples:
            - No company has this ticker or CIK
      examples:
        - error: NOT_FOUND
          message: No company has this ticker or CIK
  responses:
    BadRequest:
      description: A parameter is missing or malformed.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-Quota-Unit:
          $ref: '#/components/headers/QuotaUnit'
        X-Credits-Used:
          $ref: '#/components/headers/CreditsUsed'
        X-Quota-Limit:
          $ref: '#/components/headers/QuotaLimit'
        X-Quota-Remaining:
          $ref: '#/components/headers/QuotaRemaining'
        X-Quota-Reset:
          $ref: '#/components/headers/QuotaReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: VALIDATION_ERROR
            message: Send ticker or cik
    Unauthorized:
      description: The API key is missing, unknown or revoked.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-Quota-Unit:
          $ref: '#/components/headers/QuotaUnit'
        X-Credits-Used:
          $ref: '#/components/headers/CreditsUsed'
        X-Quota-Limit:
          $ref: '#/components/headers/QuotaLimit'
        X-Quota-Remaining:
          $ref: '#/components/headers/QuotaRemaining'
        X-Quota-Reset:
          $ref: '#/components/headers/QuotaReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: UNAUTHORIZED
            message: The API key is not valid
    PlanRequired:
      description: The account of the key has no active data API plan.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-Quota-Unit:
          $ref: '#/components/headers/QuotaUnit'
        X-Credits-Used:
          $ref: '#/components/headers/CreditsUsed'
        X-Quota-Limit:
          $ref: '#/components/headers/QuotaLimit'
        X-Quota-Remaining:
          $ref: '#/components/headers/QuotaRemaining'
        X-Quota-Reset:
          $ref: '#/components/headers/QuotaReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: PLAN_REQUIRED
            message: The account of this key has no active data API plan
    NotFound:
      description: No company has this ticker or CIK.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-Quota-Unit:
          $ref: '#/components/headers/QuotaUnit'
        X-Credits-Used:
          $ref: '#/components/headers/CreditsUsed'
        X-Quota-Limit:
          $ref: '#/components/headers/QuotaLimit'
        X-Quota-Remaining:
          $ref: '#/components/headers/QuotaRemaining'
        X-Quota-Reset:
          $ref: '#/components/headers/QuotaReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: NOT_FOUND
            message: No company has this ticker or CIK
    RateLimited:
      description: >-
        The key sent more requests in a minute than its limit (RATE_LIMITED), or
        its account has no credits left (QUOTA_EXCEEDED).
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-Quota-Unit:
          $ref: '#/components/headers/QuotaUnit'
        X-Credits-Used:
          $ref: '#/components/headers/CreditsUsed'
        X-Quota-Limit:
          $ref: '#/components/headers/QuotaLimit'
        X-Quota-Remaining:
          $ref: '#/components/headers/QuotaRemaining'
        X-Quota-Reset:
          $ref: '#/components/headers/QuotaReset'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: RATE_LIMITED
            message: Too many requests
    InternalError:
      description: Darvas failed; the error is reported.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-Quota-Unit:
          $ref: '#/components/headers/QuotaUnit'
        X-Credits-Used:
          $ref: '#/components/headers/CreditsUsed'
        X-Quota-Limit:
          $ref: '#/components/headers/QuotaLimit'
        X-Quota-Remaining:
          $ref: '#/components/headers/QuotaRemaining'
        X-Quota-Reset:
          $ref: '#/components/headers/QuotaReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: INTERNAL_ERROR
            message: Something went wrong
    Unavailable:
      description: The data store is unavailable.
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/RateLimitLimit'
        X-Quota-Unit:
          $ref: '#/components/headers/QuotaUnit'
        X-Credits-Used:
          $ref: '#/components/headers/CreditsUsed'
        X-Quota-Limit:
          $ref: '#/components/headers/QuotaLimit'
        X-Quota-Remaining:
          $ref: '#/components/headers/QuotaRemaining'
        X-Quota-Reset:
          $ref: '#/components/headers/QuotaReset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: UNAVAILABLE
            message: The data service is unavailable
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: 'A Darvas data API key: dvk_ and 43 characters.'
    bearerKey:
      type: http
      scheme: bearer
      description: The same key as a Bearer token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.