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

# Crypto Market Structure, FVG & SMC Levels API

> Detect swing highs/lows, Break of Structure (BOS), Change of Character (CHoCH), Fair Value Gaps (FVG) and liquidity pools on crypto charts via API.

## Overview

This endpoint runs Darvas market structure engines over the newest candles of a Darvas aggregated pair (by default) or a single exchange instrument. Each requested engine returns its own top-level object (`smc`, `order_blocks`, `fvg_sessions`, `swings`, `volume_zones`, or `monte_carlo`) alongside candle window metadata (`bars`, `from`, `to`, and `price`).

| Coverage | Details |
| - | - |
| Aggregated feed | `darvas` (default) reads Darvas aggregated candles across every primary exchange listing the pair, including `ALLUSD` pairs (`BTC-ALLUSD`, `BTC-ALLUSD-SWAP`) |
| Single exchanges | `okx`, `binance`, `bybit`, `hyperliquid`, `coinbase`, `kraken`, `bitstamp`, `deribit` and `bitfinex` |
| Formulas | Inverses, ratios, spreads and arithmetic over listed crypto instruments, typed (`USDTBTC`, `BTCUSDT*USDTETH`, `BTCUSDT/NVDAUSDT`, `COINBASE:BTCUSD - BINANCE:BTCUSDT`) or canonical (`1 / [okx:BTC-USDT-SWAP]`), on `exchange=formula` |
| Timeframes | `1m`, `5m`, `15m`, `30m`, `1H` (default), `4H`, `1D` and `1W` |
| Modules | Comma-separated `smc`, `order_blocks`, `fvg_sessions`, `swings`, `volume_zones` and `monte_carlo`; defaults to `smc,swings` |
| Lookback window | `lookback` from `50` to `500` newest candles (default `300`) |
| MCP tool | `get_crypto_market_structure` on the [data API MCP server](https://docs.darvas.app/mcp-server.md) |

## Structure engines

Request only the engines you need with `modules`. Unrequested engine keys are omitted from the response.

| Module | What it returns | Notes and caps |
| - | - | - |
| `smc` | `structures` (`BOS` and `CHoCH`), `order_blocks`, `fair_value_gaps`, `equal_levels` (`EQH`, `EQL`), `zones` (`premium`, `equilibrium`, `discount`), `strong_weak_levels`, `swing_points` | Up to 20 newest structures; up to 10 order blocks, fair value gaps, equal levels and swing pivots; default pivot length `50` |
| `order_blocks` | Active swing `order_blocks` (with `overlapping_blocks`) and broken `breaker_blocks` (with `break_time`) | Sorted nearest to `price` by `distance_pct` (negative below price); default pivot length `5` |
| `fvg_sessions` | `current_session` UTC range and up to 10 newest session opening `gaps` with `mitigated` and `mitigation_time` | Marks UTC sessions; sending `timeframe` coarser than `1H` returns `400` |
| `swings` | `deviation_pct`, trend `regime` (`uptrend`, `downtrend`, `range`, `transition`, `indeterminate`), `last_bos`, `last_choch`, and up to 50 newest zigzag `points` (`HH`, `HL`, `LH`, `LL`) | Default `deviation_pct` adapts to `timeframe`: `0.4` (`1m`, `5m`), `0.7` (`15m`, `30m`), `1` (`1H`), `2` (`4H`), `5` (`1D`), `8` (`1W`) |
| `volume_zones` | Up to 20 high-volume support and resistance `zones` nearest `price`, with `volume_delta`, `broken`, `break_time` and `distance_pct` | Sorted nearest to `price` first |
| `monte_carlo` | 100 shuffled paths forward over the last 50 candle bodies, with `start_price`, `end_price`, `highest_price`, `lowest_price`, `standard_deviation` and 50-bar `envelope` | Returns `null` if too few candles are available |

## Tuning parameters and related endpoints

* **Pivot and swing overrides.** Pass `swing_length` (`5` to `100`) to override the pivot window for both `smc` and `order_blocks`. Pass `deviation_pct` (`0.1` to `20`) to override the minimum percentage move for `swings`.
* **Venue filtering.** With `exchange=darvas`, pass comma-separated `venues` (such as `venues=binance,bybit,okx`) to restrict aggregation; sending `venues` with any single exchange returns `400`. Aggregated answers return `constituents` and `venues` (`null` when unfiltered); single-exchange answers omit both.
* **Formulas.** A formula `ticker` such as `USDTBTC`, `BTCUSDT*USDTETH`, `BTCUSDT/NVDAUSDT` or `1 / [okx:BTC-USDT-SWAP]` runs every engine over the formula's candles, joined from its legs' candles at the times all of them hold one. The answer carries `exchange` `formula`, `market_type` `synthetic`, the canonical `ticker`, a `display_symbol` and the `legs`. Volume-weighted engines (`volume_zones`) see volume `0` on a multi-leg formula. The [prices page](https://docs.darvas.app/crypto/prices.md#inverse-ratio-and-spread-formulas) explains the syntax and the crypto-only rule.
* **Related endpoints.** Combine structure levels with precomputed moving averages and momentum at [`/crypto/indicators`](https://docs.darvas.app/crypto/technical-indicators), full OHLCV history at [`/crypto/prices`](https://docs.darvas.app/crypto/prices), price-level order flow at [`/crypto/footprint`](https://docs.darvas.app/crypto/footprint-charts), and single-call positioning context at [`/crypto/context`](https://docs.darvas.app/crypto/market-context).

## Examples

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

headers = {"X-API-KEY": os.environ["DARVAS_API_KEY"]}
resp = requests.get(
    "https://api.darvas.app/v1/crypto/market-structure",
    headers=headers,
    params={
        "ticker": "BTC-USDT-SWAP",
        "timeframe": "1H",
        "modules": "smc,order_blocks,swings,volume_zones",
        "lookback": 300,
    },
).json()

print("Price:", resp["price"], "Regime:", resp["swings"]["regime"])
print("Latest SMC break:", resp["smc"]["structures"][0] if resp["smc"]["structures"] else None)
nearest_ob = resp["order_blocks"]["order_blocks"][:2]
for ob in nearest_ob:
    print("Order block:", ob["bias"], ob["bottom"], ob["top"], "dist %:", ob["distance_pct"])
```

```bash theme={null}
# Smart Money Concepts and swings of the BTC to NVDA ratio on hourly candles
curl -H "X-API-KEY: $DARVAS_API_KEY" -G "https://api.darvas.app/v1/crypto/market-structure" \
  --data-urlencode "ticker=BTCUSDT/NVDAUSDT" \
  --data-urlencode "modules=smc,swings"

# Run session fair value gaps and Monte Carlo projection on 15-minute aggregated ETH perpetual candles
curl -H "X-API-KEY: $DARVAS_API_KEY" \
  "https://api.darvas.app/v1/crypto/market-structure?ticker=ETH-USDT-SWAP&exchange=darvas&venues=binance,bybit,okx&timeframe=15m&modules=fvg_sessions,monte_carlo&lookback=250"
```


## OpenAPI

````yaml openapi.yaml GET /crypto/market-structure
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:
  /crypto/market-structure:
    get:
      tags:
        - crypto
      summary: Read a crypto market's structure
      description: >-
        Darvas's market structure engines over the newest candles of an
        instrument, a Darvas aggregated pair (exchange darvas, the default) or a
        formula over listed crypto instruments (exchange formula), such as
        USDTBTC, BTCUSDT*USDTETH or BTCUSDT/NVDAUSDT: Smart Money Concepts
        (breaks of structure, changes of character, order blocks, equal highs
        and lows, fair value gaps, premium and discount zones, strong and weak
        extremes), swing order and breaker blocks nearest the price, the first
        fair value gap of each UTC session (1H and finer frames), zigzag swings
        labelled HH, HL, LH and LL with the trend regime, high-volume support
        and resistance zones, and a shuffled Monte Carlo range of the next 50
        bars. modules picks the engines, smc and swings without it; the answer
        holds one object per engine named.
      operationId: getCryptoMarketStructure
      parameters:
        - $ref: '#/components/parameters/CryptoCandleTicker'
        - $ref: '#/components/parameters/StructureExchange'
        - $ref: '#/components/parameters/CryptoMarketType'
        - $ref: '#/components/parameters/DarvasVenues'
        - $ref: '#/components/parameters/StructureTimeframe'
        - $ref: '#/components/parameters/StructureModules'
        - $ref: '#/components/parameters/StructureLookback'
        - $ref: '#/components/parameters/StructureSwingLength'
        - $ref: '#/components/parameters/StructureDeviation'
      responses:
        '200':
          description: 'Read a crypto market''s structure: 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/CryptoMarketStructureResponse'
              example:
                ticker: BTC-USDT-SWAP
                exchange: darvas
                market_type: swap
                constituents:
                  - binance
                  - bybit
                  - okx
                venues: null
                timeframe: 1H
                bars: 300
                from: '2026-11-16T01:00:00.000Z'
                to: '2026-11-28T12:00:00.000Z'
                price: 97811.4
                modules:
                  - smc
                  - swings
                smc:
                  structures:
                    - scope: swing
                      bias: bullish
                      tag: BOS
                      level: 97250.5
                      start_time: '2026-11-27T08:00:00.000Z'
                      end_time: '2026-11-28T03:00:00.000Z'
                  order_blocks:
                    - scope: internal
                      bias: bullish
                      top: 96980
                      bottom: 96610.5
                      midpoint: 96795.25
                      start_time: '2026-11-27T14:00:00.000Z'
                      mitigated: false
                  fair_value_gaps:
                    - bias: bearish
                      top: 98120
                      bottom: 97960.4
                      midpoint: 98040.2
                      start_time: '2026-11-28T06:00:00.000Z'
                      mitigated: false
                  equal_levels:
                    - type: EQH
                      bias: bearish
                      level: 98240
                      start_time: '2026-11-26T19:00:00.000Z'
                      end_time: '2026-11-28T05:00:00.000Z'
                  zones:
                    - type: premium
                      top: 98240
                      bottom: 97790.6
                      midpoint: 98015.3
                      start_time: '2026-11-25T10:00:00.000Z'
                  strong_weak_levels:
                    - type: high
                      bias: bearish
                      strength: weak
                      level: 98240
                      start_time: '2026-11-26T19:00:00.000Z'
                  swing_points:
                    - type: HL
                      bias: bullish
                      level: 95910.2
                      time: '2026-11-27T02:00:00.000Z'
                swings:
                  deviation_pct: 1
                  regime: uptrend
                  last_bos:
                    type: BOS
                    direction: up
                    level: 97250.5
                    time: '2026-11-27T08:00:00.000Z'
                    confirmed_at: '2026-11-28T03:00:00.000Z'
                  last_choch: null
                  points:
                    - type: high
                      label: HH
                      price: 98240
                      time: '2026-11-28T05:00:00.000Z'
                      change_pct: 2.43
        '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:
    CryptoCandleTicker:
      name: ticker
      in: query
      required: true
      description: >-
        The instrument id: BTC-USDT or BTC-USDT-SWAP on OKX, ETH-USDC-SWAP on
        Hyperliquid, BTC-USD on Coinbase, spot:BTCUSDT or perpetual:BTCUSDT on
        Binance and Bybit. A Binance or Bybit symbol such as BTCUSDT also works
        with market_type, spot without it. A Darvas aggregated pair is
        BASE-QUOTE or BASE-QUOTE-SWAP, such as BTC-USDT-SWAP, or BTC-ALLUSD for
        one combining its USD, USDT and USDC markets. A formula over listed
        crypto instruments is typed as in the chart's pair search, such as
        USDTBTC (the inverse of BTC-USDT), BTCUSDT*USDTETH, BTCUSDT/NVDAUSDT,
        BTC/NVDA, COINBASE:BTCUSD - BINANCE:BTCUSDT or (BTCUSDT + ETHUSDT) / 2,
        or sent in the canonical form an answer names it by, such as 1 /
        [okx:BTC-USDT-SWAP]. Every leg is a listed instrument on a crypto
        exchange. With exchange formula the ticker is read as a formula; without
        it, a ticker no exchange lists is read as one, its symbols looked up on
        the exchange sent first.
      schema:
        type: string
        pattern: ^[A-Za-z0-9 ._:@/()\[\]*+^-]{1,512}$
        maxLength: 512
      example: BTC-USDT
    StructureExchange:
      name: exchange
      in: query
      required: false
      description: >-
        The exchange whose candles the engines read, darvas for Darvas's
        aggregated pair, or formula for a formula ticker; darvas without it.
      schema:
        type: string
        enum:
          - darvas
          - okx
          - binance
          - bybit
          - hyperliquid
          - coinbase
          - kraken
          - bitstamp
          - deribit
          - bitfinex
          - formula
        default: darvas
      example: darvas
    CryptoMarketType:
      name: market_type
      in: query
      required: false
      description: spot, swap, futures or option; without it, the type the id implies.
      schema:
        type: string
        enum:
          - spot
          - swap
          - futures
          - option
      example: spot
    DarvasVenues:
      name: venues
      in: query
      required: false
      description: >-
        With exchange darvas: combine only these of the pair's exchanges,
        comma-separated. Any other exchange refuses it.
      schema:
        type: string
        pattern: ^[a-z0-9][a-z0-9-]{0,31}(,[a-z0-9][a-z0-9-]{0,31}){0,15}$
        maxLength: 528
      example: binance,okx
    StructureTimeframe:
      name: timeframe
      in: query
      required: false
      description: The candle frame the engines read; 1H without it.
      schema:
        type: string
        enum:
          - 1m
          - 5m
          - 15m
          - 30m
          - 1H
          - 4H
          - 1D
          - 1W
        default: 1H
      example: 4H
    StructureModules:
      name: modules
      in: query
      required: false
      description: >-
        Comma-separated engines: smc, order_blocks, fvg_sessions (1H and finer),
        swings, volume_zones and monte_carlo; smc,swings without it.
      schema:
        type: string
        pattern: >-
          ^(smc|order_blocks|fvg_sessions|swings|volume_zones|monte_carlo)(,(smc|order_blocks|fvg_sessions|swings|volume_zones|monte_carlo)){0,5}$
        maxLength: 80
        default: smc,swings
      example: smc,order_blocks,monte_carlo
    StructureLookback:
      name: lookback
      in: query
      required: false
      description: The newest candles the engines read.
      schema:
        type: integer
        format: int32
        minimum: 50
        maximum: 500
        default: 300
      example: 300
    StructureSwingLength:
      name: swing_length
      in: query
      required: false
      description: >-
        The pivot length of smc and order_blocks; without it smc uses 50 and
        order_blocks 5.
      schema:
        type: integer
        format: int32
        minimum: 5
        maximum: 100
      example: 50
    StructureDeviation:
      name: deviation_pct
      in: query
      required: false
      description: >-
        The smallest move in percent that makes a new swing; without it, one
        fitting the frame, from 0.4 at 1m to 8 at 1W.
      schema:
        type: number
        format: double
        minimum: 0.1
        maximum: 20
      example: 2
  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:
    CryptoMarketStructureResponse:
      type: object
      description: >-
        The answer of GET /crypto/market-structure: one object per engine named
        in modules.
      additionalProperties: false
      required:
        - ticker
        - exchange
        - market_type
        - timeframe
        - bars
        - from
        - to
        - price
        - modules
      properties:
        ticker:
          type: string
          pattern: ^[A-Za-z0-9 ._:@/()\[\]*+^-]{1,512}$
          maxLength: 512
          description: >-
            The instrument id of the candles the engines read, or with exchange
            formula the canonical formula, such as 1 / [okx:BTC-USDT-SWAP].
          examples:
            - BTC-USDT-SWAP
        exchange:
          type: string
          enum:
            - darvas
            - okx
            - binance
            - bybit
            - hyperliquid
            - coinbase
            - kraken
            - bitstamp
            - deribit
            - bitfinex
            - formula
          description: The exchange of the candles the engines read, or formula.
          examples:
            - okx
        market_type:
          type: string
          enum:
            - spot
            - swap
            - futures
            - option
            - synthetic
          description: The market of the candles the engines read; synthetic for a formula.
          examples:
            - spot
        constituents:
          type: array
          maxItems: 16
          description: >-
            With exchange darvas: every exchange the analyzed pair combines.
            Absent for one exchange.
          items:
            type: string
            pattern: ^[a-z0-9][a-z0-9-]{0,31}$
            maxLength: 32
          examples:
            - - binance
              - bybit
              - okx
        venues:
          type:
            - array
            - 'null'
          maxItems: 16
          description: >-
            With exchange darvas: the exchanges the analyzed candles combine
            when venues narrowed them, null when they combine all of them.
            Absent for one exchange.
          items:
            type: string
            pattern: ^[a-z0-9][a-z0-9-]{0,31}$
            maxLength: 32
          examples:
            - null
        display_symbol:
          type: string
          pattern: ^[^\x00-\x08\x0b\x0c\x0e-\x1f]*$
          maxLength: 512
          description: >-
            With exchange formula: the name Darvas shows for the formula of the
            candles the engines read, such as USDTBTC or BTC/NVDA. Absent
            otherwise.
          examples:
            - USDTBTC
        legs:
          type: array
          maxItems: 10
          description: >-
            With exchange formula: the listed crypto instruments the formula of
            the candles the engines read reads. Absent otherwise.
          items:
            $ref: '#/components/schemas/CryptoFormulaLeg'
        timeframe:
          type: string
          enum:
            - 1m
            - 5m
            - 15m
            - 30m
            - 1H
            - 4H
            - 1D
            - 1W
          description: The candle frame the engines read.
          examples:
            - 1H
        bars:
          type: integer
          format: int32
          minimum: 0
          maximum: 500
          description: The number of candles the engines read.
          examples:
            - 300
        from:
          type: string
          format: date-time
          maxLength: 30
          description: The oldest candle the engines read.
          examples:
            - '2026-11-16T01:00:00.000Z'
        to:
          type: string
          format: date-time
          maxLength: 30
          description: The newest candle the engines read, perhaps still open.
          examples:
            - '2026-11-28T12:00:00.000Z'
        price:
          type:
            - number
            - 'null'
          format: double
          description: The close of the newest candle the engines read.
          examples:
            - 97811.4
        modules:
          type: array
          maxItems: 6
          description: The structure engines in the answer.
          items:
            type: string
            enum:
              - smc
              - order_blocks
              - fvg_sessions
              - swings
              - volume_zones
              - monte_carlo
          examples:
            - - smc
              - swings
        smc:
          $ref: '#/components/schemas/CryptoSmartMoneyConcepts'
        order_blocks:
          $ref: '#/components/schemas/CryptoOrderBlocks'
        fvg_sessions:
          $ref: '#/components/schemas/CryptoFvgSessions'
        swings:
          $ref: '#/components/schemas/CryptoSwings'
        volume_zones:
          $ref: '#/components/schemas/CryptoVolumeZones'
        monte_carlo:
          description: The Monte Carlo projection; null with too few candles.
          anyOf:
            - $ref: '#/components/schemas/CryptoMonteCarlo'
            - type: 'null'
      examples:
        - ticker: BTC-USDT-SWAP
          exchange: darvas
          market_type: swap
          constituents:
            - binance
            - bybit
            - okx
          venues: null
          timeframe: 1H
          bars: 300
          from: '2026-11-16T01:00:00.000Z'
          to: '2026-11-28T12:00:00.000Z'
          price: 97811.4
          modules:
            - smc
            - swings
          smc:
            structures:
              - scope: swing
                bias: bullish
                tag: BOS
                level: 97250.5
                start_time: '2026-11-27T08:00:00.000Z'
                end_time: '2026-11-28T03:00:00.000Z'
            order_blocks:
              - scope: internal
                bias: bullish
                top: 96980
                bottom: 96610.5
                midpoint: 96795.25
                start_time: '2026-11-27T14:00:00.000Z'
                mitigated: false
            fair_value_gaps:
              - bias: bearish
                top: 98120
                bottom: 97960.4
                midpoint: 98040.2
                start_time: '2026-11-28T06:00:00.000Z'
                mitigated: false
            equal_levels:
              - type: EQH
                bias: bearish
                level: 98240
                start_time: '2026-11-26T19:00:00.000Z'
                end_time: '2026-11-28T05:00:00.000Z'
            zones:
              - type: premium
                top: 98240
                bottom: 97790.6
                midpoint: 98015.3
                start_time: '2026-11-25T10:00:00.000Z'
            strong_weak_levels:
              - type: high
                bias: bearish
                strength: weak
                level: 98240
                start_time: '2026-11-26T19:00:00.000Z'
            swing_points:
              - type: HL
                bias: bullish
                level: 95910.2
                time: '2026-11-27T02:00:00.000Z'
          swings:
            deviation_pct: 1
            regime: uptrend
            last_bos:
              type: BOS
              direction: up
              level: 97250.5
              time: '2026-11-27T08:00:00.000Z'
              confirmed_at: '2026-11-28T03:00:00.000Z'
            last_choch: null
            points:
              - type: high
                label: HH
                price: 98240
                time: '2026-11-28T05:00:00.000Z'
                change_pct: 2.43
    CryptoFormulaLeg:
      type: object
      description: One listed crypto instrument a formula reads.
      additionalProperties: false
      required:
        - exchange
        - ticker
        - market_type
      properties:
        exchange:
          type: string
          enum:
            - darvas
            - okx
            - binance
            - bybit
            - hyperliquid
            - coinbase
            - kraken
            - bitstamp
            - deribit
            - bitfinex
          description: The leg's exchange.
          examples:
            - okx
        ticker:
          type: string
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,63}$
          description: The leg's instrument id.
          examples:
            - BTC-USDT-SWAP
        market_type:
          type: string
          enum:
            - spot
            - swap
            - futures
            - option
          description: The leg's market.
          examples:
            - spot
      examples:
        - exchange: okx
          ticker: BTC-USDT-SWAP
          market_type: swap
    CryptoSmartMoneyConcepts:
      type: object
      description: Smart Money Concepts, newest first where a list is cut.
      additionalProperties: false
      required:
        - structures
        - order_blocks
        - fair_value_gaps
        - equal_levels
        - zones
        - strong_weak_levels
        - swing_points
      properties:
        structures:
          type: array
          maxItems: 20
          description: The newest 20 SMC breaks, newest first.
          items:
            $ref: '#/components/schemas/SmcStructureEvent'
        order_blocks:
          type: array
          maxItems: 10
          description: Up to 10 SMC order blocks.
          items:
            $ref: '#/components/schemas/SmcOrderBlock'
        fair_value_gaps:
          type: array
          maxItems: 10
          description: Up to 10 SMC fair value gaps.
          items:
            $ref: '#/components/schemas/SmcFairValueGap'
        equal_levels:
          type: array
          maxItems: 10
          description: The newest 10 equal highs and lows.
          items:
            $ref: '#/components/schemas/SmcEqualLevel'
        zones:
          type: array
          maxItems: 3
          description: The premium, equilibrium and discount zones.
          items:
            $ref: '#/components/schemas/SmcZone'
        strong_weak_levels:
          type: array
          maxItems: 2
          description: The swing range's strong or weak high and low.
          items:
            $ref: '#/components/schemas/SmcStrongWeakLevel'
        swing_points:
          type: array
          maxItems: 10
          description: The newest 10 SMC swing pivots, newest first.
          items:
            $ref: '#/components/schemas/SmcSwingPoint'
      examples:
        - structures:
            - scope: swing
              bias: bullish
              tag: BOS
              level: 97250.5
              start_time: '2026-11-27T08:00:00.000Z'
              end_time: '2026-11-28T03:00:00.000Z'
          order_blocks:
            - scope: internal
              bias: bullish
              top: 96980
              bottom: 96610.5
              midpoint: 96795.25
              start_time: '2026-11-27T14:00:00.000Z'
              mitigated: false
          fair_value_gaps:
            - bias: bearish
              top: 98120
              bottom: 97960.4
              midpoint: 98040.2
              start_time: '2026-11-28T06:00:00.000Z'
              mitigated: false
          equal_levels:
            - type: EQH
              bias: bearish
              level: 98240
              start_time: '2026-11-26T19:00:00.000Z'
              end_time: '2026-11-28T05:00:00.000Z'
          zones:
            - type: premium
              top: 98240
              bottom: 97790.6
              midpoint: 98015.3
              start_time: '2026-11-25T10:00:00.000Z'
          strong_weak_levels:
            - type: high
              bias: bearish
              strength: weak
              level: 98240
              start_time: '2026-11-26T19:00:00.000Z'
          swing_points:
            - type: HL
              bias: bullish
              level: 95910.2
              time: '2026-11-27T02:00:00.000Z'
    CryptoOrderBlocks:
      type: object
      description: Order and breaker blocks, nearest the last price first.
      additionalProperties: false
      required:
        - order_blocks
        - breaker_blocks
      properties:
        order_blocks:
          type: array
          maxItems: 500
          description: Active swing order blocks, nearest first.
          items:
            $ref: '#/components/schemas/StructureOrderBlock'
        breaker_blocks:
          type: array
          maxItems: 500
          description: Breaker blocks, nearest first.
          items:
            $ref: '#/components/schemas/StructureBreakerBlock'
      examples:
        - order_blocks:
            - bias: bullish
              top: 96980
              bottom: 96610.5
              midpoint: 96795.25
              start_time: '2026-11-27T14:00:00.000Z'
              distance_pct: -1.04
              overlapping_blocks: 0
          breaker_blocks:
            - bias: bearish
              top: 99120
              bottom: 98760
              midpoint: 98940
              start_time: '2026-11-24T21:00:00.000Z'
              distance_pct: 1.15
              break_time: '2026-11-26T09:00:00.000Z'
    CryptoFvgSessions:
      type: object
      description: Session fair value gaps.
      additionalProperties: false
      required:
        - current_session
        - gaps
      properties:
        current_session:
          description: The current UTC session; null without candles.
          anyOf:
            - $ref: '#/components/schemas/FvgSession'
            - type: 'null'
        gaps:
          type: array
          maxItems: 10
          description: The newest 10 session gaps, newest first.
          items:
            $ref: '#/components/schemas/FvgSessionGap'
      examples:
        - current_session:
            direction: bullish
            high: 98240
            low: 96900.4
            start_time: '2026-11-28T00:00:00.000Z'
            end_time: '2026-11-28T12:00:00.000Z'
          gaps:
            - bias: bullish
              top: 97310
              bottom: 97150.2
              midpoint: 97230.1
              average: 97230.1
              start_time: '2026-11-28T02:00:00.000Z'
              end_time: '2026-11-28T12:00:00.000Z'
              mitigated: true
              mitigation_time: '2026-11-28T07:00:00.000Z'
    CryptoSwings:
      type: object
      description: Zigzag swings and the trend they make.
      additionalProperties: false
      required:
        - deviation_pct
        - regime
        - last_bos
        - last_choch
        - points
      properties:
        deviation_pct:
          type:
            - number
            - 'null'
          format: double
          description: The smallest move that made a zigzag swing, in percent.
          examples:
            - 1
        regime:
          type: string
          enum:
            - uptrend
            - downtrend
            - range
            - transition
            - indeterminate
          description: The trend the zigzag swings make.
          examples:
            - uptrend
        last_bos:
          description: The newest zigzag break of structure.
          anyOf:
            - $ref: '#/components/schemas/StructureBreak'
            - type: 'null'
        last_choch:
          description: The newest zigzag change of character.
          anyOf:
            - $ref: '#/components/schemas/StructureBreak'
            - type: 'null'
        points:
          type: array
          maxItems: 50
          description: The newest 50 zigzag pivots, oldest first.
          items:
            $ref: '#/components/schemas/StructureSwingPoint'
      examples:
        - deviation_pct: 1
          regime: uptrend
          last_bos:
            type: BOS
            direction: up
            level: 97250.5
            time: '2026-11-27T08:00:00.000Z'
            confirmed_at: '2026-11-28T03:00:00.000Z'
          last_choch: null
          points:
            - type: high
              label: HH
              price: 98240
              time: '2026-11-28T05:00:00.000Z'
              change_pct: 2.43
    CryptoVolumeZones:
      type: object
      description: High-volume zones, nearest the last price first.
      additionalProperties: false
      required:
        - zones
      properties:
        zones:
          type: array
          maxItems: 20
          description: The 20 volume zones nearest the last price.
          items:
            $ref: '#/components/schemas/StructureVolumeZone'
      examples:
        - zones:
            - type: support
              top: 97120
              bottom: 96880
              midpoint: 97000
              start_time: '2026-11-27T11:00:00.000Z'
              volume_delta: 1824.6
              broken: false
              break_time: null
              distance_pct: -0.83
    CryptoMonteCarlo:
      type: object
      description: The newest 50 candle bodies shuffled into 100 paths forward.
      additionalProperties: false
      required:
        - lookback_bars
        - simulations
        - start_price
        - end_price
        - highest_price
        - lowest_price
        - standard_deviation
        - envelope
      properties:
        lookback_bars:
          type: integer
          format: int32
          minimum: 0
          maximum: 50
          description: The candle bodies the Monte Carlo projection shuffled.
          examples:
            - 50
        simulations:
          type: integer
          format: int32
          minimum: 0
          maximum: 1000
          description: The Monte Carlo paths simulated.
          examples:
            - 100
        start_price:
          type:
            - number
            - 'null'
          format: double
          description: The last close, where every Monte Carlo path starts.
          examples:
            - 97811.4
        end_price:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Where every Monte Carlo path ends: a shuffle keeps the sum of the
            moves.
          examples:
            - 98402.7
        highest_price:
          type:
            - number
            - 'null'
          format: double
          description: The highest price any Monte Carlo path reached.
          examples:
            - 99630.1
        lowest_price:
          type:
            - number
            - 'null'
          format: double
          description: The lowest price any Monte Carlo path reached.
          examples:
            - 96220.8
        standard_deviation:
          type:
            - number
            - 'null'
          format: double
          description: The average spread of the Monte Carlo paths at a bar.
          examples:
            - 512.3
        envelope:
          type: array
          maxItems: 50
          description: The Monte Carlo range at each projected bar.
          items:
            $ref: '#/components/schemas/MonteCarloPoint'
      examples:
        - lookback_bars: 50
          simulations: 100
          start_price: 97811.4
          end_price: 98402.7
          highest_price: 99630.1
          lowest_price: 96220.8
          standard_deviation: 512.3
          envelope:
            - time: '2026-11-28T13:00:00.000Z'
              upper: 98120.4
              lower: 97510.2
    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
    SmcStructureEvent:
      type: object
      description: A break of structure (BOS) or change of character (CHoCH).
      additionalProperties: false
      required:
        - scope
        - bias
        - tag
        - level
        - start_time
        - end_time
      properties:
        scope:
          type: string
          enum:
            - internal
            - swing
          description: Whether the SMC break is of the internal or the swing structure.
          examples:
            - swing
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: The side the SMC break points to.
          examples:
            - bullish
        tag:
          type: string
          enum:
            - BOS
            - CHoCH
          description: BOS when the SMC break continues the trend, CHoCH when it turns it.
          examples:
            - BOS
        level:
          type:
            - number
            - 'null'
          format: double
          description: The price of the pivot the SMC break took out.
          examples:
            - 97250.5
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: When the pivot the SMC break took out formed.
          examples:
            - '2026-11-27T08:00:00.000Z'
        end_time:
          type: string
          format: date-time
          maxLength: 30
          description: The candle whose close made the SMC break.
          examples:
            - '2026-11-28T03:00:00.000Z'
      examples:
        - scope: swing
          bias: bullish
          tag: BOS
          level: 97250.5
          start_time: '2026-11-27T08:00:00.000Z'
          end_time: '2026-11-28T03:00:00.000Z'
    SmcOrderBlock:
      type: object
      description: An order block of the internal or swing structure.
      additionalProperties: false
      required:
        - scope
        - bias
        - top
        - bottom
        - midpoint
        - start_time
        - mitigated
      properties:
        scope:
          type: string
          enum:
            - internal
            - swing
          description: >-
            Whether the SMC order block is of the internal or the swing
            structure.
          examples:
            - internal
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: Bullish SMC order blocks support price, bearish ones resist it.
          examples:
            - bullish
        top:
          type:
            - number
            - 'null'
          format: double
          description: The SMC order block's top price.
          examples:
            - 96980
        bottom:
          type:
            - number
            - 'null'
          format: double
          description: The SMC order block's bottom price.
          examples:
            - 96610.5
        midpoint:
          type:
            - number
            - 'null'
          format: double
          description: The middle of the SMC order block.
          examples:
            - 96795.25
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: The candle the SMC order block was drawn from.
          examples:
            - '2026-11-27T14:00:00.000Z'
        mitigated:
          type: boolean
          description: Whether price has traded through the SMC order block.
          examples:
            - false
      examples:
        - scope: internal
          bias: bullish
          top: 96980
          bottom: 96610.5
          midpoint: 96795.25
          start_time: '2026-11-27T14:00:00.000Z'
          mitigated: false
    SmcFairValueGap:
      type: object
      description: A three-candle fair value gap.
      additionalProperties: false
      required:
        - bias
        - top
        - bottom
        - midpoint
        - start_time
        - mitigated
      properties:
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: The side the SMC fair value gap opened toward.
          examples:
            - bearish
        top:
          type:
            - number
            - 'null'
          format: double
          description: The SMC fair value gap's top price.
          examples:
            - 98120
        bottom:
          type:
            - number
            - 'null'
          format: double
          description: The SMC fair value gap's bottom price.
          examples:
            - 97960.4
        midpoint:
          type:
            - number
            - 'null'
          format: double
          description: The middle of the SMC fair value gap.
          examples:
            - 98040.2
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: The first candle of the SMC fair value gap.
          examples:
            - '2026-11-28T06:00:00.000Z'
        mitigated:
          type: boolean
          description: Whether price has filled the SMC fair value gap.
          examples:
            - false
      examples:
        - bias: bearish
          top: 98120
          bottom: 97960.4
          midpoint: 98040.2
          start_time: '2026-11-28T06:00:00.000Z'
          mitigated: false
    SmcEqualLevel:
      type: object
      description: 'Equal highs (EQH) or equal lows (EQL): resting liquidity.'
      additionalProperties: false
      required:
        - type
        - bias
        - level
        - start_time
        - end_time
      properties:
        type:
          type: string
          enum:
            - EQH
            - EQL
          description: EQH for equal highs, EQL for equal lows.
          examples:
            - EQH
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: Bearish for equal highs, bullish for equal lows.
          examples:
            - bearish
        level:
          type:
            - number
            - 'null'
          format: double
          description: The price the equal highs or lows share.
          examples:
            - 98240
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: The first of the two equal pivots.
          examples:
            - '2026-11-26T19:00:00.000Z'
        end_time:
          type: string
          format: date-time
          maxLength: 30
          description: The second of the two equal pivots.
          examples:
            - '2026-11-28T05:00:00.000Z'
      examples:
        - type: EQH
          bias: bearish
          level: 98240
          start_time: '2026-11-26T19:00:00.000Z'
          end_time: '2026-11-28T05:00:00.000Z'
    SmcZone:
      type: object
      description: The premium, equilibrium or discount part of the swing range.
      additionalProperties: false
      required:
        - type
        - top
        - bottom
        - midpoint
        - start_time
      properties:
        type:
          type: string
          enum:
            - premium
            - equilibrium
            - discount
          description: Which part of the swing range the zone is.
          examples:
            - premium
        top:
          type:
            - number
            - 'null'
          format: double
          description: The premium or discount zone's top price.
          examples:
            - 98240
        bottom:
          type:
            - number
            - 'null'
          format: double
          description: The premium or discount zone's bottom price.
          examples:
            - 97790.6
        midpoint:
          type:
            - number
            - 'null'
          format: double
          description: The middle of the premium or discount zone.
          examples:
            - 98015.3
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: Where the swing range of the zone begins.
          examples:
            - '2026-11-25T10:00:00.000Z'
      examples:
        - type: premium
          top: 98240
          bottom: 97790.6
          midpoint: 98015.3
          start_time: '2026-11-25T10:00:00.000Z'
    SmcStrongWeakLevel:
      type: object
      description: The swing range's high or low, strong when the trend protects it.
      additionalProperties: false
      required:
        - type
        - bias
        - strength
        - level
        - start_time
      properties:
        type:
          type: string
          enum:
            - high
            - low
          description: The swing range's high or its low.
          examples:
            - high
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: Bearish for the range high, bullish for the range low.
          examples:
            - bearish
        strength:
          type: string
          enum:
            - strong
            - weak
          description: >-
            Strong when the trend protects the extreme, weak when it is a
            target.
          examples:
            - weak
        level:
          type:
            - number
            - 'null'
          format: double
          description: The price of the range extreme.
          examples:
            - 98240
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: When the range extreme formed.
          examples:
            - '2026-11-26T19:00:00.000Z'
      examples:
        - type: high
          bias: bearish
          strength: weak
          level: 98240
          start_time: '2026-11-26T19:00:00.000Z'
    SmcSwingPoint:
      type: object
      description: A swing pivot labelled against the one before it.
      additionalProperties: false
      required:
        - type
        - bias
        - level
        - time
      properties:
        type:
          type: string
          enum:
            - HH
            - HL
            - LH
            - LL
          description: HH, HL, LH or LL against the SMC pivot of its kind before it.
          examples:
            - HL
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: Bullish for HH and HL, bearish for LH and LL.
          examples:
            - bullish
        level:
          type:
            - number
            - 'null'
          format: double
          description: The price of the SMC swing pivot.
          examples:
            - 95910.2
        time:
          type: string
          format: date-time
          maxLength: 30
          description: The candle of the SMC swing pivot.
          examples:
            - '2026-11-27T02:00:00.000Z'
      examples:
        - type: HL
          bias: bullish
          level: 95910.2
          time: '2026-11-27T02:00:00.000Z'
    StructureOrderBlock:
      type: object
      description: An active order block from a swing break.
      additionalProperties: false
      required:
        - bias
        - top
        - bottom
        - midpoint
        - start_time
        - distance_pct
        - overlapping_blocks
      properties:
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: Bullish swing order blocks support price, bearish ones resist it.
          examples:
            - bullish
        top:
          type:
            - number
            - 'null'
          format: double
          description: The swing order block's top price.
          examples:
            - 96980
        bottom:
          type:
            - number
            - 'null'
          format: double
          description: The swing order block's bottom price.
          examples:
            - 96610.5
        midpoint:
          type:
            - number
            - 'null'
          format: double
          description: The middle of the swing order block.
          examples:
            - 96795.25
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: The candle the swing order block was drawn from.
          examples:
            - '2026-11-27T14:00:00.000Z'
        distance_pct:
          type:
            - number
            - 'null'
          format: double
          description: >-
            How far the swing order block's middle is from the last price, in
            percent: negative below it.
          examples:
            - -1.04
        overlapping_blocks:
          type: integer
          format: int32
          minimum: 0
          maximum: 500
          description: 'Other active swing order blocks it overlaps: more makes it stronger.'
          examples:
            - 0
      examples:
        - bias: bullish
          top: 96980
          bottom: 96610.5
          midpoint: 96795.25
          start_time: '2026-11-27T14:00:00.000Z'
          distance_pct: -1.04
          overlapping_blocks: 0
    StructureBreakerBlock:
      type: object
      description: An order block price closed through, which now acts the other way.
      additionalProperties: false
      required:
        - bias
        - top
        - bottom
        - midpoint
        - start_time
        - distance_pct
        - break_time
      properties:
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: The breaker block's side before price broke it.
          examples:
            - bearish
        top:
          type:
            - number
            - 'null'
          format: double
          description: The breaker block's top price.
          examples:
            - 99120
        bottom:
          type:
            - number
            - 'null'
          format: double
          description: The breaker block's bottom price.
          examples:
            - 98760
        midpoint:
          type:
            - number
            - 'null'
          format: double
          description: The middle of the breaker block.
          examples:
            - 98940
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: The candle the breaker block was drawn from.
          examples:
            - '2026-11-24T21:00:00.000Z'
        distance_pct:
          type:
            - number
            - 'null'
          format: double
          description: >-
            How far the breaker block's middle is from the last price, in
            percent: negative below it.
          examples:
            - 1.15
        break_time:
          type:
            - string
            - 'null'
          format: date-time
          maxLength: 30
          description: When price closed through the block and made it a breaker.
          examples:
            - '2026-11-26T09:00:00.000Z'
      examples:
        - bias: bearish
          top: 99120
          bottom: 98760
          midpoint: 98940
          start_time: '2026-11-24T21:00:00.000Z'
          distance_pct: 1.15
          break_time: '2026-11-26T09:00:00.000Z'
    FvgSession:
      type: object
      description: The current UTC session's range.
      additionalProperties: false
      required:
        - direction
        - high
        - low
        - start_time
        - end_time
      properties:
        direction:
          type:
            - string
            - 'null'
          enum:
            - bullish
            - bearish
            - null
          description: The side of the session's first gap; null before one opens.
          examples:
            - bullish
        high:
          type:
            - number
            - 'null'
          format: double
          description: The current UTC session's high.
          examples:
            - 98240
        low:
          type:
            - number
            - 'null'
          format: double
          description: The current UTC session's low.
          examples:
            - 96900.4
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: When the current UTC session began.
          examples:
            - '2026-11-28T00:00:00.000Z'
        end_time:
          type: string
          format: date-time
          maxLength: 30
          description: The newest candle of the current UTC session.
          examples:
            - '2026-11-28T12:00:00.000Z'
      examples:
        - direction: bullish
          high: 98240
          low: 96900.4
          start_time: '2026-11-28T00:00:00.000Z'
          end_time: '2026-11-28T12:00:00.000Z'
    FvgSessionGap:
      type: object
      description: The first fair value gap of a UTC session.
      additionalProperties: false
      required:
        - bias
        - top
        - bottom
        - midpoint
        - average
        - start_time
        - end_time
        - mitigated
        - mitigation_time
      properties:
        bias:
          type: string
          enum:
            - bullish
            - bearish
          description: The side the session gap opened toward.
          examples:
            - bullish
        top:
          type:
            - number
            - 'null'
          format: double
          description: The session gap's top price.
          examples:
            - 97310
        bottom:
          type:
            - number
            - 'null'
          format: double
          description: The session gap's bottom price.
          examples:
            - 97150.2
        midpoint:
          type:
            - number
            - 'null'
          format: double
          description: The middle of the session gap.
          examples:
            - 97230.1
        average:
          type:
            - number
            - 'null'
          format: double
          description: The average price of the session gap.
          examples:
            - 97230.1
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: The first candle of the session gap.
          examples:
            - '2026-11-28T02:00:00.000Z'
        end_time:
          type: string
          format: date-time
          maxLength: 30
          description: The candle the session gap is drawn to.
          examples:
            - '2026-11-28T12:00:00.000Z'
        mitigated:
          type: boolean
          description: Whether price has filled the session gap.
          examples:
            - true
        mitigation_time:
          type:
            - string
            - 'null'
          format: date-time
          maxLength: 30
          description: When price filled the session gap.
          examples:
            - '2026-11-28T07:00:00.000Z'
      examples:
        - bias: bullish
          top: 97310
          bottom: 97150.2
          midpoint: 97230.1
          average: 97230.1
          start_time: '2026-11-28T02:00:00.000Z'
          end_time: '2026-11-28T12:00:00.000Z'
          mitigated: true
          mitigation_time: '2026-11-28T07:00:00.000Z'
    StructureBreak:
      type: object
      description: A break of a zigzag pivot.
      additionalProperties: false
      required:
        - type
        - direction
        - level
        - time
        - confirmed_at
      properties:
        type:
          type: string
          enum:
            - BOS
            - CHoCH
          description: >-
            BOS when the zigzag break continues the trend, CHoCH when it turns
            it.
          examples:
            - BOS
        direction:
          type: string
          enum:
            - up
            - down
          description: Up through a swing high, down through a swing low.
          examples:
            - up
        level:
          type:
            - number
            - 'null'
          format: double
          description: The price of the zigzag pivot that broke.
          examples:
            - 97250.5
        time:
          type: string
          format: date-time
          maxLength: 30
          description: The zigzag pivot that broke.
          examples:
            - '2026-11-27T08:00:00.000Z'
        confirmed_at:
          type: string
          format: date-time
          maxLength: 30
          description: The zigzag pivot whose print confirmed the break.
          examples:
            - '2026-11-28T03:00:00.000Z'
      examples:
        - type: BOS
          direction: up
          level: 97250.5
          time: '2026-11-27T08:00:00.000Z'
          confirmed_at: '2026-11-28T03:00:00.000Z'
    StructureSwingPoint:
      type: object
      description: A zigzag pivot.
      additionalProperties: false
      required:
        - type
        - label
        - price
        - time
        - change_pct
      properties:
        type:
          type: string
          enum:
            - high
            - low
          description: A zigzag swing high or swing low.
          examples:
            - high
        label:
          type:
            - string
            - 'null'
          enum:
            - HH
            - LH
            - HL
            - LL
            - null
          description: Against the zigzag pivot of its kind before it; null for the first.
          examples:
            - HH
        price:
          type:
            - number
            - 'null'
          format: double
          description: The price of the zigzag pivot.
          examples:
            - 98240
        time:
          type: string
          format: date-time
          maxLength: 30
          description: The candle of the zigzag pivot.
          examples:
            - '2026-11-28T05:00:00.000Z'
        change_pct:
          type:
            - number
            - 'null'
          format: double
          description: The move from the zigzag pivot before it, in percent.
          examples:
            - 2.43
      examples:
        - type: high
          label: HH
          price: 98240
          time: '2026-11-28T05:00:00.000Z'
          change_pct: 2.43
    StructureVolumeZone:
      type: object
      description: A support or resistance zone where volume stood out.
      additionalProperties: false
      required:
        - type
        - top
        - bottom
        - midpoint
        - start_time
        - volume_delta
        - broken
        - break_time
        - distance_pct
      properties:
        type:
          type: string
          enum:
            - support
            - resistance
          description: Support below the price, resistance above it.
          examples:
            - support
        top:
          type:
            - number
            - 'null'
          format: double
          description: The volume zone's top price.
          examples:
            - 97120
        bottom:
          type:
            - number
            - 'null'
          format: double
          description: The volume zone's bottom price.
          examples:
            - 96880
        midpoint:
          type:
            - number
            - 'null'
          format: double
          description: The middle of the volume zone.
          examples:
            - 97000
        start_time:
          type: string
          format: date-time
          maxLength: 30
          description: The candle the volume zone was drawn from.
          examples:
            - '2026-11-27T11:00:00.000Z'
        volume_delta:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Buying minus selling volume of the candles that formed the volume
            zone.
          examples:
            - 1824.6
        broken:
          type: boolean
          description: Whether price closed through the volume zone.
          examples:
            - false
        break_time:
          type:
            - string
            - 'null'
          format: date-time
          maxLength: 30
          description: When price closed through the volume zone.
          examples:
            - null
        distance_pct:
          type:
            - number
            - 'null'
          format: double
          description: >-
            How far the volume zone's middle is from the last price, in percent:
            negative below it.
          examples:
            - -0.83
      examples:
        - type: support
          top: 97120
          bottom: 96880
          midpoint: 97000
          start_time: '2026-11-27T11:00:00.000Z'
          volume_delta: 1824.6
          broken: false
          break_time: null
          distance_pct: -0.83
    MonteCarloPoint:
      type: object
      description: The simulated range one bar ahead.
      additionalProperties: false
      required:
        - time
        - upper
        - lower
      properties:
        time:
          type: string
          format: date-time
          maxLength: 30
          description: The bar the Monte Carlo range is for.
          examples:
            - '2026-11-28T13:00:00.000Z'
        upper:
          type:
            - number
            - 'null'
          format: double
          description: The highest simulated price at that bar.
          examples:
            - 98120.4
        lower:
          type:
            - number
            - 'null'
          format: double
          description: The lowest simulated price at that bar.
          examples:
            - 97510.2
      examples:
        - time: '2026-11-28T13:00:00.000Z'
          upper: 98120.4
          lower: 97510.2
  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.