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

# Funding fee settlement

> Returns how many dollars actually changed hands at funding settlement, and which side paid it. fee_usd = open_interest_usd x rate, priced at the one-sided open interest (each contract counted once, the side that pays) recorded at or before each settlement. `current` is the next 24 hours at current rates (each contract's forward rate x 24 / its own interval hours), computed live; `1d`/`3d`/`7d` are realised windows from a materialized view. Every window reports both long_paid and short_paid alongside net, and the `totals` block reconciles: the five classes (crypto, equity, commodity, fx, index), and crypto + rwa, each sum to all. Venues in settlementMeta.oi_excluded_venues are priced per venue (venues[].excluded_from_totals) but left out of every coin row and the totals.



## OpenAPI

````yaml /openapi.json get /v1/funding/settlement
openapi: 3.0.0
info:
  title: Sharpe API
  version: 1.0.0
  description: >-
    Institutional-grade crypto market data API. Access funding rates, futures,
    arbitrage opportunities, narratives, ecosystems, and more.


    Authentication is supported via two production-safe methods:

    1. **Bearer token** in the Authorization header: `Authorization: Bearer
    sk_live_...`

    2. **X-API-Key header**: `X-API-Key: sk_live_...`


    API keys in query parameters are rejected by default because URLs are
    commonly stored in logs, browser history, analytics tools, and referrer
    headers.


    These `/v1` endpoints send no CORS headers and must be called from a server:
    calling them from a browser would expose your API key in page JavaScript.


    Every endpoint needs an API key, except `/v1/health` and
    `/v1/meta/coverage`. A key works on a paid plan
    (https://www.sharpe.ai/pricing) or during its account's one-time trial of 7
    days and 250 requests; otherwise it answers 401 `expired_api_key`. There is
    no free API tier and no keyless API.
  contact:
    name: Sharpe API Support
    url: https://sharpe.ai
    email: team@sharpe.ai
servers:
  - url: https://www.sharpe.ai/api
    description: Production
security:
  - BearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: System
    description: Health checks and service status
  - name: Account
    description: API key usage and quota information
  - name: Derivatives
    description: Funding rates and futures data
  - name: Market Data
    description: >-
      Heatmaps, correlations, tracker, price predictions, news, gem finder, and
      market cap search
  - name: Arbitrage
    description: >-
      Spot-perp, cross-exchange, dated futures basis, calendar spread,
      perp-dated carry, and transfer arbitrage scanners
  - name: Categories
    description: Narratives, ecosystems, and memecoins data
  - name: New Listings
    description: >-
      Spot listings, Perp listings, delistings, suspensions, scheduled trading
      starts, exchange pages, and narrative flow across CEXs and Perp DEXs.
  - name: Screener
    description: Rug Check security, holders, resolve and trending endpoints.
  - name: Signals
    description: >-
      Composite signal scores derived from cross-exchange derivatives data:
      insider selling pressure and pump-and-dump detection.
  - name: Reports
    description: >-
      Markdown reports rendered on the server from the endpoints above: the
      market briefing, one coin's analysis, and the funding-arbitrage
      opportunities.
paths:
  /v1/funding/settlement:
    get:
      tags:
        - Derivatives
      summary: Funding fee settlement
      description: >-
        Returns how many dollars actually changed hands at funding settlement,
        and which side paid it. fee_usd = open_interest_usd x rate, priced at
        the one-sided open interest (each contract counted once, the side that
        pays) recorded at or before each settlement. `current` is the next 24
        hours at current rates (each contract's forward rate x 24 / its own
        interval hours), computed live; `1d`/`3d`/`7d` are realised windows from
        a materialized view. Every window reports both long_paid and short_paid
        alongside net, and the `totals` block reconciles: the five classes
        (crypto, equity, commodity, fx, index), and crypto + rwa, each sum to
        all. Venues in settlementMeta.oi_excluded_venues are priced per venue
        (venues[].excluded_from_totals) but left out of every coin row and the
        totals.
      operationId: getFundingSettlement
      parameters:
        - $ref: '#/components/parameters/SettlementWindowParam'
        - $ref: '#/components/parameters/SettlementClassParam'
        - $ref: '#/components/parameters/SettlementCoinParam'
        - $ref: '#/components/parameters/SettlementExchangeParam'
        - $ref: '#/components/parameters/LimitParam'
        - $ref: '#/components/parameters/SettlementOffsetParam'
        - $ref: '#/components/parameters/SettlementSortParam'
        - $ref: '#/components/parameters/SettlementExpandParam'
        - $ref: '#/components/parameters/FormatParam'
      responses:
        '200':
          description: Funding fee settlement data returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettlementResponse'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
            X-Quota-Limit:
              $ref: '#/components/headers/X-Quota-Limit'
            X-Quota-Remaining:
              $ref: '#/components/headers/X-Quota-Remaining'
            X-Quota-Reset:
              $ref: '#/components/headers/X-Quota-Reset'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  parameters:
    SettlementWindowParam:
      name: window
      in: query
      description: >-
        Settlement window. `current` is the next 24 hours of funding at current
        rates (each contract's forward rate x 24 / its own interval hours,
        priced live off open interest) and labelled `estimated`. `1d`/`3d`/`7d`
        are realised windows from the funding_fee_settlement matview.
      schema:
        default: current
        type: string
        enum:
          - current
          - 1d
          - 3d
          - 7d
    SettlementClassParam:
      name: class
      in: query
      description: >-
        Asset-class scope, the same categories as the funding board: `all`,
        `crypto`, `equity`, `commodity`, `fx` or `index` (one `asset_class`
        each). `rwa` is every non-crypto class at once (equity + commodity + fx
        + index). In the `totals` block the five classes, and `crypto` + `rwa`,
        reconcile exactly to `all`.
      schema:
        default: all
        type: string
        enum:
          - all
          - crypto
          - equity
          - commodity
          - fx
          - index
          - rwa
    SettlementCoinParam:
      name: coin
      in: query
      description: >-
        Comma-separated coins, for example BTC,ETH. Each names an asset as on
        /funding/rates: full names resolve (bitcoin -> BTC) and a ticker brings
        its lot spellings (PEPE -> PEPE, 1000PEPE, KPEPE), each still its own
        row. Unfiltered by default.
      schema:
        type: string
    SettlementExchangeParam:
      name: exchange
      in: query
      description: >-
        Filter to coins settling on a single venue. Accepts the slug, the
        display name as returned in the `venues[].exchange` field, or the ccxt
        id. The venue registry is not frozen, so read the `sharpe://exchanges`
        MCP resource or /api/funding/rates for the current list. An unrecognized
        value returns 400. Implies the per-venue breakdown internally; the
        response still omits `venues` unless `expand=venues` is also set.
      schema:
        type: string
        maxLength: 32
    LimitParam:
      name: limit
      in: query
      description: Maximum number of rows returned.
      schema:
        default: 100
        type: integer
        minimum: 1
        maximum: 1000
    SettlementOffsetParam:
      name: offset
      in: query
      description: Zero-based row offset for pagination.
      schema:
        default: 0
        type: integer
        minimum: 0
    SettlementSortParam:
      name: sort
      in: query
      description: >-
        Sort field for the selected `window`, optionally prefixed with "-" for
        descending. Rows with no value for the sort field (an unpriced coin)
        always sort last, regardless of direction.
      schema:
        type: string
        enum:
          - base_coin
          - net
          - long_paid
          - short_paid
          - open_interest_usd
          - '-base_coin'
          - '-net'
          - '-long_paid'
          - '-short_paid'
          - '-open_interest_usd'
    SettlementExpandParam:
      name: expand
      in: query
      description: >-
        Set to `venues` to include each row's per-venue breakdown. Omitted by
        default to keep the default payload small.
      schema:
        type: string
        enum:
          - venues
    FormatParam:
      name: format
      in: query
      description: >-
        Response format. When set to "csv", the response Content-Type is
        text/csv instead of JSON.
      schema:
        default: json
        type: string
        enum:
          - json
          - csv
  schemas:
    SettlementResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessEnvelope'
        - type: object
          properties:
            data:
              type: object
              properties:
                rows:
                  type: array
                  items:
                    $ref: '#/components/schemas/SettlementRow'
                totals:
                  description: >-
                    Same net/long_paid/short_paid shape as a row, scoped to the
                    selected `class`. The five classes, and crypto + rwa, sum to
                    all in every window, for net, long_paid and short_paid.
                  allOf:
                    - $ref: '#/components/schemas/SettlementWindows'
                settlementMeta:
                  $ref: '#/components/schemas/SettlementMeta'
                pagination:
                  nullable: true
                  allOf:
                    - $ref: '#/components/schemas/PaginationInfo'
              required:
                - rows
                - totals
                - settlementMeta
                - pagination
          required:
            - data
    SuccessEnvelope:
      type: object
      properties:
        data:
          description: >-
            Endpoint-specific response payload. See the operation response
            schema.
        meta:
          $ref: '#/components/schemas/ApiMeta'
      required:
        - data
        - meta
    SettlementRow:
      type: object
      properties:
        base_coin:
          type: string
        asset_class:
          type: string
          enum:
            - crypto
            - equity
            - commodity
            - fx
            - index
        open_interest_usd:
          nullable: true
          type: number
        windows:
          $ref: '#/components/schemas/SettlementWindows'
        venues:
          type: array
          items:
            $ref: '#/components/schemas/SettlementVenueRow'
          description: Present only when expand=venues is requested.
      required:
        - base_coin
        - asset_class
        - open_interest_usd
        - windows
    SettlementWindows:
      type: object
      properties:
        current:
          $ref: '#/components/schemas/SettlementWindowValueCurrent'
        1d:
          $ref: '#/components/schemas/SettlementWindowValue1d'
        3d:
          $ref: '#/components/schemas/SettlementWindowValue3d'
        7d:
          $ref: '#/components/schemas/SettlementWindowValue7d'
      required:
        - current
        - 1d
        - 3d
        - 7d
    SettlementMeta:
      type: object
      properties:
        class:
          type: string
          enum:
            - all
            - crypto
            - equity
            - commodity
            - fx
            - index
            - rwa
        coins:
          type: integer
          description: >-
            Coins in the selected class, matching the scope of `totals` --
            independent of any coin/exchange filter or pagination on this
            specific request.
        updated_at:
          type: string
          format: date-time
          description: >-
            When the settlement data was refreshed (the funding_fee_settlement
            matview's refresh, every 15 minutes), not the request time.
        oi_excluded_venues:
          type: array
          items:
            $ref: '#/components/schemas/OpenInterestExclusion'
          description: >-
            Venues whose settlement dollars are left out of every coin row and
            the totals (shown only in the venues breakdown), with the reason.
        total:
          type: integer
          description: >-
            Coins matching this request's coin/exchange filters, before
            pagination.
        limit:
          type: integer
        offset:
          type: integer
      required:
        - class
        - coins
        - updated_at
        - total
        - limit
        - offset
    PaginationInfo:
      type: object
      properties:
        cursor:
          nullable: true
          type: string
        has_more:
          type: boolean
        total:
          type: integer
          minimum: 0
      required:
        - cursor
        - has_more
        - total
    ErrorResponse:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: URI identifying the error type.
          example: https://www.sharpe.ai/errors/invalid_parameter
        title:
          type: string
          description: Short human-readable summary.
          example: Invalid Parameter
        status:
          type: integer
          description: HTTP status code.
          example: 400
        detail:
          type: string
          description: Human-readable explanation specific to this occurrence.
          example: 'Invalid parameter "coin": must not be empty'
        request_id:
          type: string
          description: Unique request identifier for support reference.
          example: req_a1b2c3d4e5f6g7h8i9j0
        doc_url:
          type: string
          format: uri
          description: Link to the relevant documentation page for troubleshooting.
          example: https://www.sharpe.ai/docs/errors#error-codes
        suggested_action:
          type: string
          description: Actionable suggestion for resolving the error.
          example: >-
            Check the 'coin' parameter value and ensure it is a valid ticker
            symbol.
      required:
        - type
        - title
        - status
        - detail
        - request_id
        - doc_url
        - suggested_action
      description: Error response following RFC 9457 (Problem Details for HTTP APIs).
    ApiMeta:
      type: object
      properties:
        request_id:
          type: string
          description: Unique request identifier.
          example: req_a1b2c3d4e5f6g7h8i9j0
        timestamp:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the response.
        elapsed_ms:
          type: integer
          minimum: 0
          description: Server processing time in milliseconds.
        dataset_id:
          type: string
          enum:
            - funding_rates_current
            - funding_rates_history
            - funding_accumulated
            - funding_fee_settlement
            - global_overview_snapshot
            - futures_open_interest
            - futures_basis
            - futures_term_structure
            - futures_liquidations
            - futures_long_short_ratio
            - futures_ohlcv
            - futures_coins
            - rwa_perp_rates_current
            - arbitrage_tickers
            - arbitrage_boards
            - arbitrage_dated_quotes
            - narratives
            - ecosystems
            - memecoins
            - mindshare
            - sectors
            - chains
            - sector_coins
            - chain_coins
            - gem_finder
            - web_traffic
            - heatmap_cache
            - stablecoins
            - news
            - listings
            - memecoin_launches
            - rug_check_inputs
            - rug_check_trending
            - pump_dump
            - insider_pressure
            - price_prediction_inputs
            - correlation_prices
            - market_cap_search
            - coingecko_coin_list
            - boros_markets
            - margin_borrow_rates
          description: >-
            The dataset the answer is read from; /v1/meta/coverage lists each
            product's datasets with their cadence and SLA.
        as_of:
          nullable: true
          type: string
          format: date-time
          description: >-
            When the data was current: the dataset's own time (the newest live
            row, the snapshot or refresh time, the fetch time), not the response
            time. Null when unknown.
        stale_after:
          nullable: true
          type: string
          format: date-time
          description: >-
            `as_of` plus the freshness SLA: after this instant the data is
            stale, whenever the body is read (a cached copy can be re-judged
            against it).
        freshness_sla_seconds:
          type: number
          description: >-
            Seconds after `as_of` the data stays fresh: the writer's cadence
            plus one skipped run.
        freshness_status:
          type: string
          enum:
            - fresh
            - stale
            - unknown
          description: >-
            `fresh` within the SLA at `generated_at`, `stale` past it, `unknown`
            when `as_of` is null.
        runtime_status:
          type: string
          enum:
            - ok
            - degraded
          description: >-
            `degraded` when this read was incomplete: a leg timed out or failed,
            a row budget was hit, or a fallback answered. Degraded answers are
            never cached.
        served_from:
          type: string
          enum:
            - snapshot
            - table
            - matview
            - live
            - last-good
          description: >-
            Where the rows came from: a precomputed snapshot, a table or
            materialized view, the upstream on request, or the server's last
            good answer.
        generated_at:
          type: string
          format: date-time
          description: >-
            When this answer was built (the instant `freshness_status` is judged
            at).
        source:
          type: array
          items:
            type: string
          description: >-
            The upstream sources behind the rows (source ids such as `binance`,
            `coingecko`).
        coverage:
          type: object
          properties:
            expected:
              type: number
            used:
              type: number
            dropped:
              type: object
              additionalProperties:
                type: number
            missing:
              type: array
              items:
                type: string
          required:
            - expected
            - used
            - dropped
          description: >-
            How complete the stored data is (never whether it is cached): `used`
            of `expected` inputs counted; `dropped` counts the rest by reason (a
            halted market is `not_live`, outside `expected`); `missing` names
            the late ones when known.
        warnings:
          type: array
          items:
            type: string
          description: >-
            What the read could not do, in words (an unreadable table, a late
            writer).
        truncated:
          type: boolean
          description: True when a row budget cut the answer short.
      required:
        - request_id
        - timestamp
        - elapsed_ms
    SettlementVenueRow:
      type: object
      properties:
        exchange:
          type: string
        open_interest_usd:
          nullable: true
          type: number
        windows:
          $ref: '#/components/schemas/SettlementWindows'
        excluded_from_totals:
          type: string
          description: >-
            Present only on a venue whose open interest is priced per venue but
            left out of the coin row and the totals (MEXC today), with the
            reason.
      required:
        - exchange
        - open_interest_usd
        - windows
    SettlementWindowValueCurrent:
      type: object
      properties:
        net:
          nullable: true
          type: number
          x-field: funding.settlement_net_next_24h
          description: >-
            Net funding expected over the next 24 hours, never realised: each
            contract's forward rate (the venue's predicted rate where it
            publishes one, else its current rate) × 24 / its interval hours ×
            its live one-sided open interest, as longs' payments minus shorts'.
        long_paid:
          nullable: true
          type: number
          minimum: 0
          x-field: funding.settlement_long_paid_next_24h
          description: >-
            Funding longs are expected to pay over the next 24 hours, never
            realised: the sum over contracts whose forward fee (forward rate ×
            24 / interval hours × live one-sided open interest) is positive.
        short_paid:
          nullable: true
          type: number
          minimum: 0
          x-field: funding.settlement_short_paid_next_24h
          description: >-
            Funding shorts are expected to pay over the next 24 hours, never
            realised: the size of the sum over contracts whose forward fee
            (forward rate × 24 / interval hours × live one-sided open interest)
            is negative.
        estimated:
          type: boolean
          description: >-
            True on the current window only: priced live from the in-progress
            rate and latest open interest, not from the matview.
        rate_source:
          nullable: true
          description: >-
            Where the current window's rate came from: `predicted` (the venue's
            `predicted_rate`, published only by Kraken, Crypto.com, Pacifica and
            Hyperliquid, where it equals `rate`), `current` (the row's `rate`),
            or `mixed` on a coin, venue or total row whose contracts used both.
            `current` is the normal path, and it is the forward estimate only
            where the funding book's `rate_kind` is `estimate`: on Bitfinex it
            is the last settled rate and on Deribit the trailing 8-hour realised
            rate, projected forward. `null` when no contract was priced.
          type: string
          enum:
            - predicted
            - current
            - mixed
        coverage_ratio:
          type: number
          minimum: 0
          maximum: 1
          description: >-
            Realised windows only: how much of the window is covered by priced
            history. Open interest accrues only forward, so a newly-priced
            venue's 7d column starts below 1.0. A coin, venue or total row is
            the open-interest-weighted mean of its contracts' ratios; a contract
            that stopped settling (halted or delisted) is expected only until
            its last priced settlement plus one interval.
        partial:
          type: boolean
          description: >-
            Realised windows only: true when coverage_ratio is below 0.9. The
            numbers still render -- partial means building history, not hidden.
        complete:
          type: boolean
          description: >-
            Realised windows with a coverage_ratio only: true when
            coverage_ratio is at least 0.9 (the opposite of `partial`).
        listed_within_window:
          nullable: true
          description: >-
            Realised windows with a coverage_ratio only: whether a contract
            behind the value was listed inside the window. Always `null` on this
            endpoint today: the settlement data prices seven days and carries no
            listing time, so a listing is unknown, never assumed.
          type: boolean
        halted_within_window:
          type: boolean
          description: >-
            Realised windows with a coverage_ratio only: true when a contract
            priced in the window stopped settling inside it: its funding row
            left the live book or went stale, and its last priced settlement
            plus one interval falls in the window. Its coverage is measured only
            up to that point, so a halt does not read as missing history.
      required:
        - net
        - long_paid
        - short_paid
      description: >-
        net = long_paid - short_paid. Both legs are always present alongside net
        -- a $0 net can conceal $50M flowing each way. Null means an
        unpriced/absent contract, never a zero flow.
    SettlementWindowValue1d:
      type: object
      properties:
        net:
          nullable: true
          type: number
          x-field: funding.settlement_net_24h
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        long_paid:
          nullable: true
          type: number
          minimum: 0
          x-field: funding.settlement_long_paid_24h
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        short_paid:
          nullable: true
          type: number
          minimum: 0
          x-field: funding.settlement_short_paid_24h
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        estimated:
          type: boolean
          description: >-
            True on the current window only: priced live from the in-progress
            rate and latest open interest, not from the matview.
        rate_source:
          nullable: true
          description: >-
            Where the current window's rate came from: `predicted` (the venue's
            `predicted_rate`, published only by Kraken, Crypto.com, Pacifica and
            Hyperliquid, where it equals `rate`), `current` (the row's `rate`),
            or `mixed` on a coin, venue or total row whose contracts used both.
            `current` is the normal path, and it is the forward estimate only
            where the funding book's `rate_kind` is `estimate`: on Bitfinex it
            is the last settled rate and on Deribit the trailing 8-hour realised
            rate, projected forward. `null` when no contract was priced.
          type: string
          enum:
            - predicted
            - current
            - mixed
        coverage_ratio:
          type: number
          minimum: 0
          maximum: 1
          x-field: funding.settlement_coverage_24h
          description: >-
            Share of the span a contract was expected to settle in that its
            history covers: expected from the listing (master listed_at, else
            the first settlement ever) to the halt (or now), covered from the
            first settlement to the last + one interval, capped by the hours the
            window's settlements cover (Σ interval_hours, when known) so a hole
            inside the span reads as missing; complete at ≥ 0.9; coin, venue and
            total rows are the OI-weighted mean of their contracts' ratios
            (combineCoverage).
        partial:
          type: boolean
          description: >-
            Realised windows only: true when coverage_ratio is below 0.9. The
            numbers still render -- partial means building history, not hidden.
        complete:
          type: boolean
          description: >-
            Realised windows with a coverage_ratio only: true when
            coverage_ratio is at least 0.9 (the opposite of `partial`).
        listed_within_window:
          nullable: true
          description: >-
            Realised windows with a coverage_ratio only: whether a contract
            behind the value was listed inside the window. Always `null` on this
            endpoint today: the settlement data prices seven days and carries no
            listing time, so a listing is unknown, never assumed.
          type: boolean
        halted_within_window:
          type: boolean
          description: >-
            Realised windows with a coverage_ratio only: true when a contract
            priced in the window stopped settling inside it: its funding row
            left the live book or went stale, and its last priced settlement
            plus one interval falls in the window. Its coverage is measured only
            up to that point, so a halt does not read as missing history.
      required:
        - net
        - long_paid
        - short_paid
      description: >-
        net = long_paid - short_paid. Both legs are always present alongside net
        -- a $0 net can conceal $50M flowing each way. Null means an
        unpriced/absent contract, never a zero flow.
    SettlementWindowValue3d:
      type: object
      properties:
        net:
          nullable: true
          type: number
          x-field: funding.settlement_net_3d
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        long_paid:
          nullable: true
          type: number
          minimum: 0
          x-field: funding.settlement_long_paid_3d
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        short_paid:
          nullable: true
          type: number
          minimum: 0
          x-field: funding.settlement_short_paid_3d
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        estimated:
          type: boolean
          description: >-
            True on the current window only: priced live from the in-progress
            rate and latest open interest, not from the matview.
        rate_source:
          nullable: true
          description: >-
            Where the current window's rate came from: `predicted` (the venue's
            `predicted_rate`, published only by Kraken, Crypto.com, Pacifica and
            Hyperliquid, where it equals `rate`), `current` (the row's `rate`),
            or `mixed` on a coin, venue or total row whose contracts used both.
            `current` is the normal path, and it is the forward estimate only
            where the funding book's `rate_kind` is `estimate`: on Bitfinex it
            is the last settled rate and on Deribit the trailing 8-hour realised
            rate, projected forward. `null` when no contract was priced.
          type: string
          enum:
            - predicted
            - current
            - mixed
        coverage_ratio:
          type: number
          minimum: 0
          maximum: 1
          x-field: funding.settlement_coverage_3d
          description: >-
            Share of the span a contract was expected to settle in that its
            history covers: expected from the listing (master listed_at, else
            the first settlement ever) to the halt (or now), covered from the
            first settlement to the last + one interval, capped by the hours the
            window's settlements cover (Σ interval_hours, when known) so a hole
            inside the span reads as missing; complete at ≥ 0.9; coin, venue and
            total rows are the OI-weighted mean of their contracts' ratios
            (combineCoverage).
        partial:
          type: boolean
          description: >-
            Realised windows only: true when coverage_ratio is below 0.9. The
            numbers still render -- partial means building history, not hidden.
        complete:
          type: boolean
          description: >-
            Realised windows with a coverage_ratio only: true when
            coverage_ratio is at least 0.9 (the opposite of `partial`).
        listed_within_window:
          nullable: true
          description: >-
            Realised windows with a coverage_ratio only: whether a contract
            behind the value was listed inside the window. Always `null` on this
            endpoint today: the settlement data prices seven days and carries no
            listing time, so a listing is unknown, never assumed.
          type: boolean
        halted_within_window:
          type: boolean
          description: >-
            Realised windows with a coverage_ratio only: true when a contract
            priced in the window stopped settling inside it: its funding row
            left the live book or went stale, and its last priced settlement
            plus one interval falls in the window. Its coverage is measured only
            up to that point, so a halt does not read as missing history.
      required:
        - net
        - long_paid
        - short_paid
      description: >-
        net = long_paid - short_paid. Both legs are always present alongside net
        -- a $0 net can conceal $50M flowing each way. Null means an
        unpriced/absent contract, never a zero flow.
    SettlementWindowValue7d:
      type: object
      properties:
        net:
          nullable: true
          type: number
          x-field: funding.settlement_net_7d
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        long_paid:
          nullable: true
          type: number
          minimum: 0
          x-field: funding.settlement_long_paid_7d
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        short_paid:
          nullable: true
          type: number
          minimum: 0
          x-field: funding.settlement_short_paid_7d
          description: >-
            Funding moved per window: fee = rate × one-sided OI of the same
            (exchange, symbol) at the newest OI ≤ settled_at (OI no older than 2
            × interval); long_paid = Σ fee > 0, short_paid = Σ −fee < 0, net = Σ
            fee; unpriced settlements are left out, never 0.
        estimated:
          type: boolean
          description: >-
            True on the current window only: priced live from the in-progress
            rate and latest open interest, not from the matview.
        rate_source:
          nullable: true
          description: >-
            Where the current window's rate came from: `predicted` (the venue's
            `predicted_rate`, published only by Kraken, Crypto.com, Pacifica and
            Hyperliquid, where it equals `rate`), `current` (the row's `rate`),
            or `mixed` on a coin, venue or total row whose contracts used both.
            `current` is the normal path, and it is the forward estimate only
            where the funding book's `rate_kind` is `estimate`: on Bitfinex it
            is the last settled rate and on Deribit the trailing 8-hour realised
            rate, projected forward. `null` when no contract was priced.
          type: string
          enum:
            - predicted
            - current
            - mixed
        coverage_ratio:
          type: number
          minimum: 0
          maximum: 1
          x-field: funding.settlement_coverage_7d
          description: >-
            Share of the span a contract was expected to settle in that its
            history covers: expected from the listing (master listed_at, else
            the first settlement ever) to the halt (or now), covered from the
            first settlement to the last + one interval, capped by the hours the
            window's settlements cover (Σ interval_hours, when known) so a hole
            inside the span reads as missing; complete at ≥ 0.9; coin, venue and
            total rows are the OI-weighted mean of their contracts' ratios
            (combineCoverage).
        partial:
          type: boolean
          description: >-
            Realised windows only: true when coverage_ratio is below 0.9. The
            numbers still render -- partial means building history, not hidden.
        complete:
          type: boolean
          description: >-
            Realised windows with a coverage_ratio only: true when
            coverage_ratio is at least 0.9 (the opposite of `partial`).
        listed_within_window:
          nullable: true
          description: >-
            Realised windows with a coverage_ratio only: whether a contract
            behind the value was listed inside the window. Always `null` on this
            endpoint today: the settlement data prices seven days and carries no
            listing time, so a listing is unknown, never assumed.
          type: boolean
        halted_within_window:
          type: boolean
          description: >-
            Realised windows with a coverage_ratio only: true when a contract
            priced in the window stopped settling inside it: its funding row
            left the live book or went stale, and its last priced settlement
            plus one interval falls in the window. Its coverage is measured only
            up to that point, so a halt does not read as missing history.
      required:
        - net
        - long_paid
        - short_paid
      description: >-
        net = long_paid - short_paid. Both legs are always present alongside net
        -- a $0 net can conceal $50M flowing each way. Null means an
        unpriced/absent contract, never a zero flow.
    OpenInterestExclusion:
      type: object
      properties:
        exchange:
          type: string
        reason:
          type: string
      required:
        - exchange
        - reason
      description: >-
        A venue whose stored open interest is published per venue but left out
        of every cross-venue total, and why. MEXC today: its holdVol moves 7.00x
        the position change of MEXC's own deal feed, so it fits neither side
        count.
  headers:
    X-Request-Id:
      schema:
        type: string
      description: Unique request identifier. Include this value when contacting support.
    X-RateLimit-Limit:
      schema:
        type: integer
      description: Requests allowed per minute for the authenticated API key.
    X-RateLimit-Remaining:
      schema:
        type: integer
      description: Requests remaining in the current one-minute rate-limit window.
    X-RateLimit-Reset:
      schema:
        type: integer
      description: Unix timestamp in seconds when the current rate-limit window resets.
    X-Quota-Limit:
      schema:
        type: integer
      description: Monthly request quota for the authenticated API key.
    X-Quota-Remaining:
      schema:
        type: integer
      description: Monthly requests remaining in the current billing period.
    X-Quota-Reset:
      schema:
        type: string
        format: date-time
      description: >-
        ISO 8601 timestamp when the monthly quota resets, when available from
        the quota store.
    Retry-After:
      schema:
        type: integer
      description: >-
        Seconds to wait before retrying after a per-minute rate-limit or
        monthly-quota rejection.
  responses:
    BadRequest:
      description: Invalid or missing parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://www.sharpe.ai/errors/invalid_parameter
            title: Invalid Parameter
            status: 400
            detail: 'Invalid parameter "coin": must not be empty'
            request_id: req_a1b2c3d4e5f6g7h8i9j0
            doc_url: https://www.sharpe.ai/docs/errors#error-codes
            suggested_action: >-
              Check the parameter value against the endpoint documentation. Use
              GET /v1/futures/coins or GET /v1/meta/coverage to discover valid
              values.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    Unauthorized:
      description: >-
        Missing or invalid API key, or a key without an active plan
        (`expired_api_key`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            invalid_api_key:
              summary: Missing or invalid API key
              value:
                type: https://www.sharpe.ai/errors/invalid_api_key
                title: Invalid API Key
                status: 401
                detail: >-
                  Missing API key. Pass via Authorization: Bearer <key> or the
                  X-API-Key header.
                request_id: req_a1b2c3d4e5f6g7h8i9j0
                doc_url: https://www.sharpe.ai/docs/authentication
                suggested_action: >-
                  Check your API key is correct. Pass it via Authorization:
                  Bearer <key> or the X-API-Key header.
            expired_api_key:
              summary: The key has no active plan
              value:
                type: https://www.sharpe.ai/errors/expired_api_key
                title: Expired API Key
                status: 401
                detail: >-
                  This API key has no active plan. Subscribe or renew at
                  https://www.sharpe.ai/dashboard/billing.
                request_id: req_a1b2c3d4e5f6g7h8i9j0
                doc_url: https://www.sharpe.ai/docs/authentication
                suggested_action: >-
                  Subscribe or renew at https://www.sharpe.ai/dashboard/billing.
                  The same key works again once the plan is active.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    Forbidden:
      description: The API key lacks a scope this endpoint requires.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://www.sharpe.ai/errors/insufficient_scope
            title: Insufficient Scope
            status: 403
            detail: 'This API key requires the following scope(s): read.'
            request_id: req_a1b2c3d4e5f6g7h8i9j0
            doc_url: https://www.sharpe.ai/docs/authentication
            suggested_action: >-
              Create a new API key with the required scopes, or contact support
              to update scopes on your existing key.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    RateLimited:
      description: >-
        Per-minute rate limit or monthly quota exceeded. Both are temporary;
        retry after the Retry-After header.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rate_limit_exceeded:
              summary: Per-minute rate limit exceeded
              value:
                type: https://www.sharpe.ai/errors/rate_limit_exceeded
                title: Rate Limit Exceeded
                status: 429
                detail: Rate limit of 30 requests per minute exceeded.
                request_id: req_a1b2c3d4e5f6g7h8i9j0
                doc_url: https://www.sharpe.ai/docs/rate-limits
                suggested_action: >-
                  Wait until the time in the X-RateLimit-Reset header before
                  retrying. Upgrade your plan for higher limits.
            monthly_quota_exceeded:
              summary: Monthly quota exceeded
              value:
                type: https://www.sharpe.ai/errors/monthly_quota_exceeded
                title: Monthly Quota Exceeded
                status: 429
                detail: >-
                  Monthly quota of 50,000 requests exceeded. Resets at
                  2026-12-01T00:00:00.000Z.
                request_id: req_a1b2c3d4e5f6g7h8i9j0
                doc_url: https://www.sharpe.ai/docs/rate-limits
                suggested_action: >-
                  Retry after the seconds given in the Retry-After header, when
                  the monthly quota resets. Upgrade your plan for a higher
                  monthly quota. Check usage at GET /v1/usage.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
        X-Quota-Limit:
          $ref: '#/components/headers/X-Quota-Limit'
        X-Quota-Remaining:
          $ref: '#/components/headers/X-Quota-Remaining'
        X-Quota-Reset:
          $ref: '#/components/headers/X-Quota-Reset'
        Retry-After:
          $ref: '#/components/headers/Retry-After'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://www.sharpe.ai/errors/internal_error
            title: Internal Server Error
            status: 500
            detail: An unexpected error occurred. Please try again later.
            request_id: req_a1b2c3d4e5f6g7h8i9j0
            doc_url: https://www.sharpe.ai/docs/errors#retry-guidance
            suggested_action: >-
              Retry with exponential backoff (1s, 2s, 4s, up to 30s). If the
              error persists, contact support with the X-Request-Id.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    ServiceUnavailable:
      description: The API or quota verification service is temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            type: https://www.sharpe.ai/errors/service_unavailable
            title: Service Unavailable
            status: 503
            detail: >-
              API key verification is temporarily unavailable. Please retry
              shortly.
            request_id: req_a1b2c3d4e5f6g7h8i9j0
            doc_url: https://www.sharpe.ai/docs/errors#retry-guidance
            suggested_action: >-
              The API is temporarily unavailable. Retry with exponential
              backoff. If it persists, contact team@sharpe.ai with the
              X-Request-Id.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Pass your API key as a Bearer token in the Authorization header:
        `Authorization: Bearer sk_live_...`
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Alternatively, pass your API key via the X-API-Key header.

````

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