> ## 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.

# Yield Curve Spread & Sahm Rule API

> Get US Treasury 2s10s, 3m10y, 2s5s and 5s30s spreads, 10-year less Fed funds, inversion streaks, the curve regime and the Sahm Rule recession indicator.

## Overview

This endpoint computes US Treasury yield curve spreads from the daily par yield curve: 2s10s, 3m10y, 2s5s, 5s30s and the 10-year yield less the Fed funds target midpoint, with the curve's regime and how long each spread has been inverted.

`sahm_rule` gives the real-time Sahm Rule recession indicator from the monthly unemployment rate. The history arrays cover `days` of spreads and `months` of the Sahm Rule.

| Coverage | Details |
| - | - |
| Spreads | 2s10s, 3m10y, 2s5s, 5s30s and 10-year less the Fed funds target midpoint |
| Recession signal | Sahm Rule from the monthly unemployment rate |
| History | 1 to 1,260 trading days and 1 to 240 months |
| MCP tool | `get_macro_spreads` 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/spreads",
    headers=headers,
    params={
        "days": 250,
        "months": 36,
    },
).json()
print(answer["yield_curve_spreads"])
print(answer["sahm_rule"])
```

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


## OpenAPI

````yaml openapi.yaml GET /macro/spreads
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/spreads:
    get:
      tags:
        - macro
      summary: Get US Treasury yield curve spreads and Sahm Rule indicator
      description: >-
        Computes US Treasury yield curve spreads (2s10s, 3m10y, 2s5s, 5s30s, 10y
        minus Fed funds target midpoint), curve regime, inversion streak
        durations, and the Sahm Rule real-time recession indicator directly from
        Darvas's stored US Treasury, BIS, and BLS macro tables.
      operationId: getMacroSpreads
      parameters:
        - $ref: '#/components/parameters/MacroSpreadsDays'
        - $ref: '#/components/parameters/MacroSpreadsMonths'
        - $ref: '#/components/parameters/MacroSpreadsStartDate'
        - $ref: '#/components/parameters/MacroSpreadsEndDate'
        - $ref: '#/components/parameters/MacroSpreadsIncludeHistory'
      responses:
        '200':
          description: >-
            Get US Treasury yield curve spreads and Sahm Rule indicator: 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/MacroSpreadsResponse'
              example:
                as_of: '2026-11-27'
                computed_at: '2026-11-30T00:00:00.000Z'
                yield_curve_spreads:
                  date: '2026-11-27'
                  yield_3m_pct: 4.55
                  yield_2y_pct: 4.21
                  yield_5y_pct: 4.18
                  yield_10y_pct: 4.32
                  yield_30y_pct: 4.51
                  fed_funds_target_mid_pct: 4.625
                  spread_2s10s_bps: 11
                  spread_2s10s_pct: 0.11
                  spread_3m10y_bps: -23
                  spread_3m10y_pct: -0.23
                  spread_2s5s_bps: -3
                  spread_5s30s_bps: 33
                  spread_10y_minus_fed_bps: -30.5
                  is_2s10s_inverted: false
                  is_3m10y_inverted: true
                  inversion_2s10s_streak_days: 0
                  inversion_3m10y_streak_days: 14
                  curve_regime: flat
                  change_1w_2s10s_bps: 4.2
                  change_1m_2s10s_bps: 9.5
                  change_1w_3m10y_bps: -2.1
                  change_1m_3m10y_bps: 12.4
                  last_2s10s_inversion_date: '2024-09-05'
                  last_3m10y_inversion_date: '2026-11-27'
                sahm_rule:
                  date: '2026-10-01'
                  unemployment_rate_pct: 4.1
                  first_published_unemployment_rate_pct: 4.1
                  unemployment_ma3_pct: 4.13
                  prior_12m_min_ma3_pct: 3.9
                  sahm_rule_indicator_pct_pts: 0.23
                  recession_signal_triggered: false
                  distance_to_trigger_pct_pts: 0.27
                spreads_history:
                  - date: '2026-11-27'
                    yield_3m_pct: 4.55
                    yield_2y_pct: 4.21
                    yield_5y_pct: 4.18
                    yield_10y_pct: 4.32
                    yield_30y_pct: 4.51
                    fed_funds_target_mid_pct: 4.625
                    spread_2s10s_bps: 11
                    spread_2s10s_pct: 0.11
                    spread_3m10y_bps: -23
                    spread_3m10y_pct: -0.23
                    spread_2s5s_bps: -3
                    spread_5s30s_bps: 33
                    spread_10y_minus_fed_bps: -30.5
                    is_2s10s_inverted: false
                    is_3m10y_inverted: true
                    inversion_2s10s_streak_days: 0
                    inversion_3m10y_streak_days: 14
                sahm_history:
                  - date: '2026-10-01'
                    unemployment_rate_pct: 4.1
                    first_published_unemployment_rate_pct: 4.1
                    unemployment_ma3_pct: 4.13
                    prior_12m_min_ma3_pct: 3.9
                    sahm_rule_indicator_pct_pts: 0.23
                    recession_signal_triggered: false
                    distance_to_trigger_pct_pts: 0.27
                spreads_count: 1
                sahm_count: 1
                sources:
                  - id: us_treasury_yield_curve
                    name: US Department of the Treasury Daily Par Yield Curve Rates
                    series:
                      - 3_month
                      - 2_year
                      - 5_year
                      - 10_year
                      - 30_year
                    frequency: daily_business_day
        '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:
    MacroSpreadsDays:
      name: days
      in: query
      required: false
      description: >-
        Trailing trading days of yield curve spreads history (1 to 1260; default
        90).
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 1260
        default: 90
      example: 90
    MacroSpreadsMonths:
      name: months
      in: query
      required: false
      description: Trailing months of Sahm Rule history (1 to 240; default 24).
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 240
        default: 24
      example: 24
    MacroSpreadsStartDate:
      name: start_date
      in: query
      required: false
      description: Optional inclusive lower date bound (YYYY-MM-DD) for history arrays.
      schema:
        type: string
        format: date
        maxLength: 10
      example: '2025-01-01'
    MacroSpreadsEndDate:
      name: end_date
      in: query
      required: false
      description: Optional inclusive upper date bound (YYYY-MM-DD) for history arrays.
      schema:
        type: string
        format: date
        maxLength: 10
      example: '2026-11-30'
    MacroSpreadsIncludeHistory:
      name: include_history
      in: query
      required: false
      description: >-
        Whether to include spreads_history and sahm_history arrays (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:
    MacroSpreadsResponse:
      type: object
      description: The answer of GET /macro/spreads.
      additionalProperties: false
      required:
        - computed_at
        - spreads_history
        - sahm_history
        - spreads_count
        - sahm_count
      properties:
        as_of:
          type:
            - string
            - 'null'
          format: date
          description: Latest curve or labor observation date.
          examples:
            - '2026-11-27'
        computed_at:
          type: string
          format: date-time
          description: UTC computation timestamp.
          examples:
            - '2026-11-30T00:00:00.000Z'
        yield_curve_spreads:
          oneOf:
            - $ref: '#/components/schemas/YieldCurveSpreadSnapshot'
            - type: 'null'
        sahm_rule:
          oneOf:
            - $ref: '#/components/schemas/SahmRulePoint'
            - type: 'null'
        spreads_history:
          type: array
          maxItems: 1260
          description: Daily Treasury spreads history.
          items:
            $ref: '#/components/schemas/YieldCurveSpreadPoint'
        sahm_history:
          type: array
          maxItems: 240
          description: Monthly Sahm Rule history.
          items:
            $ref: '#/components/schemas/SahmRulePoint'
        spreads_count:
          type: integer
          format: int32
          minimum: 0
          maximum: 1260
          description: Number of daily spreads rows returned.
          examples:
            - 90
        sahm_count:
          type: integer
          format: int32
          minimum: 0
          maximum: 240
          description: Number of monthly Sahm Rule rows returned.
          examples:
            - 24
        methodology:
          type: string
          pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
          maxLength: 1500
          description: Spread and Sahm Rule calculation methodology.
          examples:
            - >-
              Spreads are computed in basis points from US Treasury daily par
              yields.
        sources:
          type: array
          maxItems: 10
          description: Stored public macro dataset sources.
          items:
            $ref: '#/components/schemas/MacroSpreadSource'
      examples:
        - as_of: '2026-11-27'
          computed_at: '2026-11-30T00:00:00.000Z'
          yield_curve_spreads:
            date: '2026-11-27'
            yield_3m_pct: 4.55
            yield_2y_pct: 4.21
            yield_5y_pct: 4.18
            yield_10y_pct: 4.32
            yield_30y_pct: 4.51
            fed_funds_target_mid_pct: 4.625
            spread_2s10s_bps: 11
            spread_2s10s_pct: 0.11
            spread_3m10y_bps: -23
            spread_3m10y_pct: -0.23
            spread_2s5s_bps: -3
            spread_5s30s_bps: 33
            spread_10y_minus_fed_bps: -30.5
            is_2s10s_inverted: false
            is_3m10y_inverted: true
            inversion_2s10s_streak_days: 0
            inversion_3m10y_streak_days: 14
            curve_regime: flat
            change_1w_2s10s_bps: 4.2
            change_1m_2s10s_bps: 9.5
            change_1w_3m10y_bps: -2.1
            change_1m_3m10y_bps: 12.4
            last_2s10s_inversion_date: '2024-09-05'
            last_3m10y_inversion_date: '2026-11-27'
          sahm_rule:
            date: '2026-10-01'
            unemployment_rate_pct: 4.1
            first_published_unemployment_rate_pct: 4.1
            unemployment_ma3_pct: 4.13
            prior_12m_min_ma3_pct: 3.9
            sahm_rule_indicator_pct_pts: 0.23
            recession_signal_triggered: false
            distance_to_trigger_pct_pts: 0.27
          spreads_history:
            - date: '2026-11-27'
              yield_3m_pct: 4.55
              yield_2y_pct: 4.21
              yield_5y_pct: 4.18
              yield_10y_pct: 4.32
              yield_30y_pct: 4.51
              fed_funds_target_mid_pct: 4.625
              spread_2s10s_bps: 11
              spread_2s10s_pct: 0.11
              spread_3m10y_bps: -23
              spread_3m10y_pct: -0.23
              spread_2s5s_bps: -3
              spread_5s30s_bps: 33
              spread_10y_minus_fed_bps: -30.5
              is_2s10s_inverted: false
              is_3m10y_inverted: true
              inversion_2s10s_streak_days: 0
              inversion_3m10y_streak_days: 14
          sahm_history:
            - date: '2026-10-01'
              unemployment_rate_pct: 4.1
              first_published_unemployment_rate_pct: 4.1
              unemployment_ma3_pct: 4.13
              prior_12m_min_ma3_pct: 3.9
              sahm_rule_indicator_pct_pts: 0.23
              recession_signal_triggered: false
              distance_to_trigger_pct_pts: 0.27
          spreads_count: 1
          sahm_count: 1
    YieldCurveSpreadSnapshot:
      type: object
      description: Latest US Treasury curve spread snapshot with regime and 1w/1m changes.
      additionalProperties: false
      required:
        - date
        - curve_regime
        - is_2s10s_inverted
        - is_3m10y_inverted
        - inversion_2s10s_streak_days
        - inversion_3m10y_streak_days
      properties:
        date: 1102c99a-2d27-49df-8811-d5ee2359950f
        yield_3m_pct: 48cba676-3ef3-403d-8792-39b530e4711f
        yield_2y_pct: 7ea14b90-0a7c-43d9-82de-d255da3788c5
        yield_5y_pct: 08a4c4e1-9e96-41ba-a37f-2a8b38616983
        yield_10y_pct: e740ba01-f26f-48d0-8893-e58d5cf19d50
        yield_30y_pct: cad1cae0-a3b5-4022-8fe8-0f939fb9a12e
        fed_funds_target_mid_pct: 66aec9f4-fa54-49dc-875e-3dc457e95bfc
        spread_2s10s_bps: f64a7498-c3ab-4885-a934-1679bb24261f
        spread_2s10s_pct: 7293784f-6aef-41e1-8f49-263e5dd9315c
        spread_3m10y_bps: a26d4342-63a8-42c9-8832-98a2967cae81
        spread_3m10y_pct: 7deda279-3319-429e-a7d1-36c7d12bb221
        spread_2s5s_bps: c97f87fe-8d52-47b3-a179-ce94d9ef1f07
        spread_5s30s_bps: 46b4e862-fa4e-4785-9aa3-7033b5a7f314
        spread_10y_minus_fed_bps: 45ed645d-fb08-44f7-98a9-7ae7ffdb187a
        is_2s10s_inverted: d6d0f6a2-362c-4c95-83bc-9fd9d066c251
        is_3m10y_inverted: 80bbbdb5-61c0-4fd5-95ed-666c3e2b5f90
        inversion_2s10s_streak_days: ece11716-53bb-4dea-90be-da05d2882b29
        inversion_3m10y_streak_days: 739f76be-5a9a-4c65-a72c-e3ebdd6b9b8d
        curve_regime:
          type: string
          enum:
            - inverted
            - flat
            - normal
            - steep
            - unknown
          description: Yield curve slope classification.
          examples:
            - flat
        change_1w_2s10s_bps:
          type:
            - number
            - 'null'
          format: double
          description: 1-week (5 trading day) change in 2s10s spread (bps).
          examples:
            - 4.2
        change_1m_2s10s_bps:
          type:
            - number
            - 'null'
          format: double
          description: 1-month (21 trading day) change in 2s10s spread (bps).
          examples:
            - 9.5
        change_1w_3m10y_bps:
          type:
            - number
            - 'null'
          format: double
          description: 1-week change in 3m10y spread (bps).
          examples:
            - -2.1
        change_1m_3m10y_bps:
          type:
            - number
            - 'null'
          format: double
          description: 1-month change in 3m10y spread (bps).
          examples:
            - 12.4
        last_2s10s_inversion_date:
          type:
            - string
            - 'null'
          format: date
          description: Most recent 2s10s inversion date.
          examples:
            - '2024-09-05'
        last_3m10y_inversion_date:
          type:
            - string
            - 'null'
          format: date
          description: Most recent 3m10y inversion date.
          examples:
            - '2026-11-27'
      examples:
        - date: '2026-11-27'
          yield_3m_pct: 4.55
          yield_2y_pct: 4.21
          yield_5y_pct: 4.18
          yield_10y_pct: 4.32
          yield_30y_pct: 4.51
          fed_funds_target_mid_pct: 4.625
          spread_2s10s_bps: 11
          spread_2s10s_pct: 0.11
          spread_3m10y_bps: -23
          spread_3m10y_pct: -0.23
          spread_2s5s_bps: -3
          spread_5s30s_bps: 33
          spread_10y_minus_fed_bps: -30.5
          is_2s10s_inverted: false
          is_3m10y_inverted: true
          inversion_2s10s_streak_days: 0
          inversion_3m10y_streak_days: 14
          curve_regime: flat
          change_1w_2s10s_bps: 4.2
          change_1m_2s10s_bps: 9.5
          change_1w_3m10y_bps: -2.1
          change_1m_3m10y_bps: 12.4
          last_2s10s_inversion_date: '2024-09-05'
          last_3m10y_inversion_date: '2026-11-27'
    SahmRulePoint:
      type: object
      description: Monthly Sahm Rule recession indicator derived from BLS U-3 unemployment.
      additionalProperties: false
      required:
        - date
        - unemployment_rate_pct
        - unemployment_ma3_pct
        - prior_12m_min_ma3_pct
        - sahm_rule_indicator_pct_pts
        - recession_signal_triggered
        - distance_to_trigger_pct_pts
      properties:
        date:
          type: string
          format: date
          description: BLS reference month (YYYY-MM-01).
          examples:
            - '2026-10-01'
        unemployment_rate_pct:
          type:
            - number
            - 'null'
          format: double
          description: Seasonally adjusted U-3 unemployment rate (%).
          examples:
            - 4.1
        first_published_unemployment_rate_pct:
          type:
            - number
            - 'null'
          format: double
          description: First-published U-3 vintage (%).
          examples:
            - 4.1
        unemployment_ma3_pct:
          type:
            - number
            - 'null'
          format: double
          description: Trailing 3-month moving average of U-3 (%).
          examples:
            - 4.13
        prior_12m_min_ma3_pct:
          type:
            - number
            - 'null'
          format: double
          description: Minimum 3-month MA over the prior 12 months (%).
          examples:
            - 3.9
        sahm_rule_indicator_pct_pts:
          type:
            - number
            - 'null'
          format: double
          description: Current 3m MA minus prior 12m min (pp).
          examples:
            - 0.23
        recession_signal_triggered:
          type: boolean
          description: True when indicator reaches >= 0.50 percentage points.
          examples:
            - false
        distance_to_trigger_pct_pts:
          type:
            - number
            - 'null'
          format: double
          description: Remaining percentage points before 0.50 trigger.
          examples:
            - 0.27
      examples:
        - date: '2026-10-01'
          unemployment_rate_pct: 4.1
          first_published_unemployment_rate_pct: 4.1
          unemployment_ma3_pct: 4.13
          prior_12m_min_ma3_pct: 3.9
          sahm_rule_indicator_pct_pts: 0.23
          recession_signal_triggered: false
          distance_to_trigger_pct_pts: 0.27
    YieldCurveSpreadPoint:
      type: object
      description: One trading day's US Treasury yield curve spreads and inversion streaks.
      additionalProperties: false
      required:
        - date
        - is_2s10s_inverted
        - is_3m10y_inverted
        - inversion_2s10s_streak_days
        - inversion_3m10y_streak_days
      properties:
        date:
          type: string
          format: date
          description: Trading date UTC.
          examples:
            - '2026-11-27'
        yield_3m_pct:
          type:
            - number
            - 'null'
          format: double
          description: US Treasury 3-month par yield (%).
          examples:
            - 4.55
        yield_2y_pct:
          type:
            - number
            - 'null'
          format: double
          description: US Treasury 2-year par yield (%).
          examples:
            - 4.21
        yield_5y_pct:
          type:
            - number
            - 'null'
          format: double
          description: US Treasury 5-year par yield (%).
          examples:
            - 4.18
        yield_10y_pct:
          type:
            - number
            - 'null'
          format: double
          description: US Treasury 10-year par yield (%).
          examples:
            - 4.32
        yield_30y_pct:
          type:
            - number
            - 'null'
          format: double
          description: US Treasury 30-year par yield (%).
          examples:
            - 4.51
        fed_funds_target_mid_pct:
          type:
            - number
            - 'null'
          format: double
          description: Fed funds target range midpoint (%).
          examples:
            - 4.625
        spread_2s10s_bps:
          type:
            - number
            - 'null'
          format: double
          description: 10Y minus 2Y spread in basis points.
          examples:
            - 11
        spread_2s10s_pct:
          type:
            - number
            - 'null'
          format: double
          description: 10Y minus 2Y spread in percentage points.
          examples:
            - 0.11
        spread_3m10y_bps:
          type:
            - number
            - 'null'
          format: double
          description: 10Y minus 3M spread in basis points.
          examples:
            - -23
        spread_3m10y_pct:
          type:
            - number
            - 'null'
          format: double
          description: 10Y minus 3M spread in percentage points.
          examples:
            - -0.23
        spread_2s5s_bps:
          type:
            - number
            - 'null'
          format: double
          description: 5Y minus 2Y spread in basis points.
          examples:
            - -3
        spread_5s30s_bps:
          type:
            - number
            - 'null'
          format: double
          description: 30Y minus 5Y spread in basis points.
          examples:
            - 33
        spread_10y_minus_fed_bps:
          type:
            - number
            - 'null'
          format: double
          description: 10Y yield minus Fed target midpoint in bps.
          examples:
            - -30.5
        is_2s10s_inverted:
          type: boolean
          description: True when 2s10s spread is negative.
          examples:
            - false
        is_3m10y_inverted:
          type: boolean
          description: True when 3m10y spread is negative.
          examples:
            - true
        inversion_2s10s_streak_days:
          type: integer
          format: int32
          minimum: 0
          maximum: 5000
          description: Consecutive trading days with negative 2s10s spread.
          examples:
            - 0
        inversion_3m10y_streak_days:
          type: integer
          format: int32
          minimum: 0
          maximum: 5000
          description: Consecutive trading days with negative 3m10y spread.
          examples:
            - 14
      examples:
        - date: '2026-11-27'
          yield_3m_pct: 4.55
          yield_2y_pct: 4.21
          yield_5y_pct: 4.18
          yield_10y_pct: 4.32
          yield_30y_pct: 4.51
          fed_funds_target_mid_pct: 4.625
          spread_2s10s_bps: 11
          spread_2s10s_pct: 0.11
          spread_3m10y_bps: -23
          spread_3m10y_pct: -0.23
          spread_2s5s_bps: -3
          spread_5s30s_bps: 33
          spread_10y_minus_fed_bps: -30.5
          is_2s10s_inverted: false
          is_3m10y_inverted: true
          inversion_2s10s_streak_days: 0
          inversion_3m10y_streak_days: 14
    MacroSpreadSource:
      type: object
      description: Underlying stored dataset metadata for macro spreads.
      additionalProperties: false
      required:
        - id
        - name
        - series
        - frequency
      properties:
        id: c418479c-0c2c-4ae8-a9a8-ba6c93dc9a2f
        name: 96be8e07-f7f8-456e-a601-b20c73acbec6
        series:
          type: array
          maxItems: 20
          description: Series used from findata.macro_observations.
          items:
            type: string
            pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
            maxLength: 80
          examples:
            - - 3_month
              - 2_year
              - 10_year
        frequency:
          type: string
          pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
          maxLength: 40
          description: Observation cadence.
          examples:
            - daily_business_day
      examples:
        - id: us_treasury_yield_curve
          name: US Department of the Treasury Daily Par Yield Curve Rates
          series:
            - 3_month
            - 2_year
            - 5_year
            - 10_year
            - 30_year
          frequency: daily_business_day
    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.