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

> Returns perpetual funding rates across all supported exchanges. Supports current snapshots, accumulated rates over multiple windows, and per-coin historical rates.



## OpenAPI

````yaml /openapi.json get /v1/funding/rates
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/rates:
    get:
      tags:
        - Derivatives
      summary: Funding rates
      description: >-
        Returns perpetual funding rates across all supported exchanges. Supports
        current snapshots, accumulated rates over multiple windows, and per-coin
        historical rates.
      operationId: getFundingRates
      parameters:
        - name: type
          in: query
          description: Type of funding rate data to retrieve.
          schema:
            default: current
            type: string
            enum:
              - current
              - accumulated
              - history
        - name: coin
          in: query
          description: >-
            The coin to return: a ticker (e.g. BTC), a lot or venue spelling
            (e.g. `1000PEPE`, `kPEPE`), or the full name (e.g. `bitcoin`,
            resolved to BTC). Case-insensitive, one coin per request. `coin`
            names an asset, not a base_coin string: every contract of that asset
            is returned whatever its base_coin spelling, so `PEPE` also returns
            the 1000PEPE and KPEPE lot contracts (read `lot_multiplier`), and a
            ticker two assets share (BB is BounceBit and BlackBerry) returns
            both, narrowed by `asset_class`. Optional filter for type=current
            and type=accumulated; required when type=history. A value that no
            perpetual in the funding book has ever settled returns 400 rather
            than an empty result set; GET /api/funding/coins lists every ticker
            carried.
          schema:
            type: string
            maxLength: 64
        - name: days
          in: query
          description: Number of days of history to retrieve (type=history only).
          schema:
            default: 30
            type: integer
            minimum: 1
            maximum: 1095
        - name: exchange
          in: query
          description: >-
            Filter to a single venue. Accepts the slug (e.g. `gate-io`), the
            display name as returned in the `exchange` field (e.g. `Gate.io`),
            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.
          schema:
            type: string
            maxLength: 32
        - name: asset_class
          in: query
          description: >-
            Narrow the response to one underlying category. The funding book is
            not crypto-only. Tokenized equity, commodity, index and FX perps
            trade on the same venues, so this is unfiltered by default. Applies
            to type=current and type=accumulated; ignored for type=history. An
            unrecognized value returns 400.
          schema:
            type: string
            enum:
              - crypto
              - equity
              - commodity
              - fx
              - index
        - name: margin
          in: query
          description: >-
            Narrow the response to one collateral convention: `linear` for
            quote-margined contracts, `inverse` for coin-margined ones.
            Unfiltered by default. Applies to type=current and type=accumulated;
            ignored for type=history. An unrecognized value returns 400.
          schema:
            type: string
            enum:
              - linear
              - inverse
        - name: limit
          in: query
          description: Maximum number of records to return per page.
          schema:
            type: integer
            minimum: 1
            maximum: 5000
        - name: cursor
          in: query
          description: Opaque pagination cursor from a previous response.
          schema:
            type: string
        - name: sort
          in: query
          description: >-
            type=current only: order the rows by `open_interest`, ascending, or
            descending with the leading `-`. Rows with unknown open interest
            come last either way. Applied before `limit`/`cursor`. Default: the
            book's order (base_coin, exchange, symbol).
          schema:
            type: string
            enum:
              - open_interest
              - '-open_interest'
        - name: extremes
          in: query
          description: >-
            type=current only: answer with the N highest and N lowest rows by
            `rate_8h` (`extremes.highest`, `extremes.lowest`) among fresh rows
            with a usable interval, and how many rows each check left out
            (`extremes.omitted`). The other filters narrow the rows first.
            Returns an object instead of rows; cannot be combined with `limit`,
            `cursor` or `sort`.
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: min_oi_usd
          in: query
          description: >-
            type=current, with `extremes` only: leave out rows whose open
            interest in USD is below this floor. A row with unknown open
            interest fails a floor above 0.
          schema:
            type: number
            minimum: 0
        - name: stats
          in: query
          description: >-
            type=current only: `1` answers with the whole book's funding
            (`market`: mean and open-interest-weighted APR, the count of
            positive and negative rates, and how many of the tracked venues have
            a fresh contract). Returns an object instead of rows; cannot be
            combined with `coin`, `exchange`, `margin`, `asset_class`, `limit`,
            `cursor` or `sort`.
          schema:
            type: string
            enum:
              - '1'
        - name: summary
          in: query
          description: >-
            type=current or type=accumulated, with `coin` only: `1` answers with
            the coin's funding across venues (`summary`) instead of the rows.
            For type=current: the average and median 8-hour rate, how they were
            reduced, the venues behind them, the open interest of every contract
            and the next settlement. For type=accumulated, per window: the
            median realised funding and the median APR over the venues whose
            history covers the window, and the carry spread APR (best short
            venue minus best long venue). Returns an object instead of rows;
            cannot be combined with `limit`, `cursor` or `sort`.
          schema:
            type: string
            enum:
              - '1'
        - $ref: '#/components/parameters/FormatParam'
      responses:
        '200':
          description: Funding rates returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FundingRatesResponse'
          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'
            X-Data-Source:
              $ref: '#/components/headers/X-Data-Source'
            X-Data-Stale:
              $ref: '#/components/headers/X-Data-Stale'
            X-Data-As-Of:
              $ref: '#/components/headers/X-Data-As-Of'
            X-Freshness-Sla-Seconds:
              $ref: '#/components/headers/X-Freshness-Sla-Seconds'
            X-Coverage-Start:
              $ref: '#/components/headers/X-Coverage-Start'
            X-Requested-Start:
              $ref: '#/components/headers/X-Requested-Start'
            X-Coverage-Complete:
              $ref: '#/components/headers/X-Coverage-Complete'
            X-Days-Clamped:
              $ref: '#/components/headers/X-Days-Clamped'
        '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:
    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:
    FundingRatesResponse:
      anyOf:
        - allOf:
            - $ref: '#/components/schemas/SuccessEnvelope'
            - type: object
              properties:
                data:
                  type: array
                  items:
                    oneOf:
                      - $ref: '#/components/schemas/FundingCurrentRow'
                      - $ref: '#/components/schemas/FundingAccumulatedRow'
                      - $ref: '#/components/schemas/FundingHistoryRow'
              required:
                - data
        - allOf:
            - $ref: '#/components/schemas/PaginatedEnvelope'
            - type: object
              properties:
                data:
                  type: array
                  items:
                    oneOf:
                      - $ref: '#/components/schemas/FundingCurrentRow'
                      - $ref: '#/components/schemas/FundingAccumulatedRow'
                      - $ref: '#/components/schemas/FundingHistoryRow'
              required:
                - data
        - allOf:
            - $ref: '#/components/schemas/SuccessEnvelope'
            - type: object
              properties:
                data:
                  $ref: '#/components/schemas/FundingCurrentAggregates'
              required:
                - data
        - allOf:
            - $ref: '#/components/schemas/SuccessEnvelope'
            - type: object
              properties:
                data:
                  $ref: '#/components/schemas/FundingAccumulatedAggregates'
              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
    FundingCurrentRow:
      type: object
      properties:
        exchange:
          type: string
        symbol:
          type: string
        base_coin:
          type: string
        rate:
          type: number
          x-field: funding.rate_native
          description: >-
            A contract's funding rate as its venue publishes it, a fraction per
            the contract's own funding interval: on most venues the in-progress
            estimate for the next settlement, on Kraken, Crypto.com and Bitfinex
            the rate charged at the last settlement, on Deribit the funding
            realised over the trailing 8 hours (the funding book's `rate_kind`
            says which).
        predicted_rate:
          nullable: true
          description: >-
            The venue's own forecast for the coming settlement, when it
            publishes one beside `rate`: Kraken (`fundingRatePrediction`),
            Crypto.com (`estimated_funding_rate`, an estimate for the next
            4-hour interval rather than the next hourly settlement), Pacifica
            (`next_funding_rate`), and Hyperliquid, where it is a copy of
            `rate`. `null` on every other venue (about 93% of rows), including
            Binance, Bybit and OKX: read `rate` and `rate_kind` there.
          type: number
        interval_hours:
          type: number
          x-field: funding.interval_hours
          description: >-
            Hours between a contract's funding settlements as its venue
            publishes them, the span its native rate is charged over; it differs
            by venue and market and is never assumed to be 8.
        next_funding_time:
          nullable: true
          type: string
          format: date-time
          x-field: funding.next_funding_at
          description: >-
            When a contract's next funding settlement is due, as its venue
            publishes it; Deribit's sits on a synthetic 00/08/16 UTC grid.
        updated_at:
          type: string
          format: date-time
        margin_type:
          type: string
          enum:
            - linear
            - inverse
          description: >-
            Collateral convention for the contract: `linear` (quote-margined) or
            `inverse` (coin-margined).
        asset_class:
          type: string
          enum:
            - crypto
            - equity
            - commodity
            - fx
            - index
          description: >-
            Underlying category: `crypto`, `equity`, `commodity`, `fx` or
            `index`. Tokenized-equity perps such as Bybit `TSLL` are `equity`,
            not `crypto`.
        mark_price:
          nullable: true
          description: >-
            Binance's mark price for the base coin (from its premiumIndex feed),
            attached to every venue's row for that coin as context: it is not
            this venue's own mark or a traded quote. A lot contract such as
            `1000PEPE` carries Binance's lot price as is; a bare coin that
            Binance lists only as a lot is priced at the lot price divided by
            the lot size. `null` when Binance has no contract for the coin in
            the same asset class.
          type: number
        mark_price_updated_at:
          nullable: true
          type: string
          format: date-time
        open_interest:
          nullable: true
          type: number
          x-field: oi.contract
          description: >-
            A contract's latest open interest in US dollars, counted one-sided
            (each contract once) and matched on (exchange, symbol): two
            contracts of one coin on one venue carry their own figures.
        market_cap_rank:
          nullable: true
          description: >-
            Market-cap rank of the base coin, where `1` is the largest. `null`
            when the coin is unranked. Sort unranked rows last rather than
            treating `null` as a rank.
          type: integer
        age_seconds:
          nullable: true
          type: number
          x-field: funding.age_seconds
          description: >-
            Seconds since a contract's row in the funding book was last updated,
            measured when the answer is served.
        data_source:
          type: string
        freshness_sla_seconds:
          type: integer
          x-field: funding.freshness_sla_seconds
          description: >-
            Seconds after its last update a funding-book row still counts as
            fresh: the writer's cadence plus one skipped run (600).
        is_stale:
          type: boolean
          x-field: funding.is_stale
          description: >-
            True when a contract's row was last updated longer ago than the
            funding book's freshness SLA (600 seconds), or its update time
            cannot be read, so its rate may no longer be the venue's current
            one.
        asset_id:
          nullable: true
          description: >-
            The instrument master asset of this contract: the CoinGecko id when
            the asset was resolved strictly (`pepe`), otherwise
            `<class>:<ticker>` (`equity:bb`). Every contract of one asset
            carries the same id, whatever its base_coin spelling. `null` when
            the master does not know the contract.
          type: string
        asset_symbol:
          nullable: true
          description: >-
            The asset ticker as a trader reads it: `PEPE` on the 1000PEPE and
            KPEPE contracts too. `null` when the master does not know the
            contract.
          type: string
        lot_multiplier:
          nullable: true
          description: >-
            Units of the asset per unit the contract quotes: `1000` for Binance
            1000PEPEUSDT, `1` for Gate.io PEPE_USDT. From the venue or a checked
            alias, never parsed from the symbol. `rate` is a fraction of
            notional and needs no scaling. `null` when unknown.
          type: number
        instrument_status:
          nullable: true
          description: >-
            The venue's own status for the contract, as the instruments sync
            last read it. `null` when the master does not know the contract.
          type: string
          enum:
            - trading
            - halted
            - delisted
            - settling
            - pre_launch
        is_live:
          nullable: true
          description: >-
            `true`: trading, and the venue's contract list was read within 30
            minutes. `false`: read within 30 minutes and not trading. `null`:
            unknown (no read in 30 minutes, a status value the sync could not
            interpret, or a contract the master does not know).
          type: boolean
        rate_8h:
          nullable: true
          type: number
          x-field: funding.rate_8h
          description: >-
            A contract's venue-native funding rate on the shared 8-hour basis,
            rate × 8 / interval_hours; an interval outside {1, 2, 3, 4, 6, 8,
            12, 24} gives null (bad_interval), never an 8 h guess.
        apr:
          nullable: true
          type: number
          x-field: funding.apr
          description: >-
            A contract's funding rate annualized from its own interval, rate ×
            8,760 / interval_hours, as a fraction; an unusable interval gives
            null.
        rate_kind:
          type: string
          enum:
            - estimate
            - last_settled
            - trailing_8h
          x-field: funding.rate_kind
          description: >-
            What a contract's native funding rate measures on its venue:
            `estimate`, the in-progress rate for the next settlement (most
            venues); `last_settled`, the rate charged at the last settlement,
            one interval before the next (Kraken, Crypto.com, Bitfinex);
            `trailing_8h`, funding realised over the last 8 hours (Deribit).
      required:
        - exchange
        - symbol
        - base_coin
        - rate
        - interval_hours
        - next_funding_time
        - updated_at
        - margin_type
        - asset_class
        - mark_price
        - mark_price_updated_at
        - open_interest
        - market_cap_rank
        - age_seconds
        - data_source
        - freshness_sla_seconds
        - is_stale
    FundingAccumulatedRow:
      type: object
      properties:
        base_coin:
          type: string
        exchange:
          type: string
        symbol:
          type: string
        acc_1d:
          nullable: true
          type: number
          x-field: funding.accumulated_1d
          description: >-
            Σ of a contract's realised settlement rates in the window (1d … 1y),
            each over its own interval.
        acc_7d:
          nullable: true
          type: number
          x-field: funding.accumulated_7d
          description: >-
            Σ of a contract's realised settlement rates in the window (1d … 1y),
            each over its own interval.
        acc_30d:
          nullable: true
          type: number
          x-field: funding.accumulated_30d
          description: >-
            Σ of a contract's realised settlement rates in the window (1d … 1y),
            each over its own interval.
        acc_90d:
          nullable: true
          type: number
          x-field: funding.accumulated_90d
          description: >-
            Σ of a contract's realised settlement rates in the window (1d … 1y),
            each over its own interval.
        acc_1y:
          nullable: true
          type: number
          x-field: funding.accumulated_1y
          description: >-
            Σ of a contract's realised settlement rates in the window (1d … 1y),
            each over its own interval.
        settlements_1d:
          type: integer
          x-field: funding.settlement_count_1d
          description: >-
            How many funding settlements of a contract the window holds, each
            over the contract's own interval: compare it with ceil(window hours
            / interval hours), never with a fixed 8-hour count.
        settlements_7d:
          type: integer
          x-field: funding.settlement_count_7d
          description: >-
            How many funding settlements of a contract the window holds, each
            over the contract's own interval: compare it with ceil(window hours
            / interval hours), never with a fixed 8-hour count.
        settlements_30d:
          type: integer
          x-field: funding.settlement_count_30d
          description: >-
            How many funding settlements of a contract the window holds, each
            over the contract's own interval: compare it with ceil(window hours
            / interval hours), never with a fixed 8-hour count.
        settlements_90d:
          type: integer
          x-field: funding.settlement_count_90d
          description: >-
            How many funding settlements of a contract the window holds, each
            over the contract's own interval: compare it with ceil(window hours
            / interval hours), never with a fixed 8-hour count.
        settlements_1y:
          type: integer
          x-field: funding.settlement_count_1y
          description: >-
            How many funding settlements of a contract the window holds, each
            over the contract's own interval: compare it with ceil(window hours
            / interval hours), never with a fixed 8-hour count.
        first_settled_at:
          nullable: true
          type: string
          format: date-time
        last_settled_at:
          nullable: true
          type: string
          format: date-time
        covered_hours_1d:
          nullable: true
          description: >-
            Hours of funding the settlements summed in `acc_1d` stand for: the
            sum of their `interval_hours`. Fewer hours than the window (or than
            the contract's listed span inside it) means missing settlements,
            also in the middle of the window. It can exceed the window by up to
            one interval (a first settlement's interval reaches back past the
            window start). `null` when unknown.
          type: number
          minimum: 0
        covered_hours_7d:
          nullable: true
          description: >-
            Hours of funding the settlements summed in `acc_7d` stand for: the
            sum of their `interval_hours`. Fewer hours than the window (or than
            the contract's listed span inside it) means missing settlements,
            also in the middle of the window. It can exceed the window by up to
            one interval (a first settlement's interval reaches back past the
            window start). `null` when unknown.
          type: number
          minimum: 0
        covered_hours_30d:
          nullable: true
          description: >-
            Hours of funding the settlements summed in `acc_30d` stand for: the
            sum of their `interval_hours`. Fewer hours than the window (or than
            the contract's listed span inside it) means missing settlements,
            also in the middle of the window. It can exceed the window by up to
            one interval (a first settlement's interval reaches back past the
            window start). `null` when unknown.
          type: number
          minimum: 0
        covered_hours_90d:
          nullable: true
          description: >-
            Hours of funding the settlements summed in `acc_90d` stand for: the
            sum of their `interval_hours`. Fewer hours than the window (or than
            the contract's listed span inside it) means missing settlements,
            also in the middle of the window. It can exceed the window by up to
            one interval (a first settlement's interval reaches back past the
            window start). `null` when unknown.
          type: number
          minimum: 0
        covered_hours_1y:
          nullable: true
          description: >-
            Hours of funding the settlements summed in `acc_1y` stand for: the
            sum of their `interval_hours`. Fewer hours than the window (or than
            the contract's listed span inside it) means missing settlements,
            also in the middle of the window. It can exceed the window by up to
            one interval (a first settlement's interval reaches back past the
            window start). `null` when unknown.
          type: number
          minimum: 0
        acc_apr_1d:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_1d
          description: >-
            A contract's realised funding in the window (funding.accumulated)
            annualised over the days of history behind it, accumulated /
            observed days × 365: observed days are the span from its first
            settlement in the window to its last + one interval, capped by the
            hours its settlements cover and by the window (without settlement
            times, settlements × interval hours, clamped; without either, the
            whole window); null, never 0, when the window holds no sum or no
            observed day.
        acc_apr_7d:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_7d
          description: >-
            A contract's realised funding in the window (funding.accumulated)
            annualised over the days of history behind it, accumulated /
            observed days × 365: observed days are the span from its first
            settlement in the window to its last + one interval, capped by the
            hours its settlements cover and by the window (without settlement
            times, settlements × interval hours, clamped; without either, the
            whole window); null, never 0, when the window holds no sum or no
            observed day.
        acc_apr_30d:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_30d
          description: >-
            A contract's realised funding in the window (funding.accumulated)
            annualised over the days of history behind it, accumulated /
            observed days × 365: observed days are the span from its first
            settlement in the window to its last + one interval, capped by the
            hours its settlements cover and by the window (without settlement
            times, settlements × interval hours, clamped; without either, the
            whole window); null, never 0, when the window holds no sum or no
            observed day.
        acc_apr_90d:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_90d
          description: >-
            A contract's realised funding in the window (funding.accumulated)
            annualised over the days of history behind it, accumulated /
            observed days × 365: observed days are the span from its first
            settlement in the window to its last + one interval, capped by the
            hours its settlements cover and by the window (without settlement
            times, settlements × interval hours, clamped; without either, the
            whole window); null, never 0, when the window holds no sum or no
            observed day.
        acc_apr_1y:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_1y
          description: >-
            A contract's realised funding in the window (funding.accumulated)
            annualised over the days of history behind it, accumulated /
            observed days × 365: observed days are the span from its first
            settlement in the window to its last + one interval, capped by the
            hours its settlements cover and by the window (without settlement
            times, settlements × interval hours, clamped; without either, the
            whole window); null, never 0, when the window holds no sum or no
            observed day.
        asset_class:
          nullable: true
          description: >-
            Underlying category, joined in from the live contract book. `null`
            when no live contract matches, rather than being defaulted to
            `crypto`.
          type: string
          enum:
            - crypto
            - equity
            - commodity
            - fx
            - index
        margin_type:
          nullable: true
          description: >-
            Collateral convention, joined in from the live contract book. `null`
            when no live contract matches.
          type: string
          enum:
            - linear
            - inverse
        interval_hours:
          nullable: true
          type: number
          x-field: funding.interval_hours
          description: >-
            Hours between a contract's funding settlements as its venue
            publishes them, the span its native rate is charged over; it differs
            by venue and market and is never assumed to be 8.
        is_active:
          type: boolean
          description: >-
            `false` when the accumulated identity has no live contract behind
            it, meaning a delisted or renamed pair. Those rows keep their
            accumulated history but carry `null` metadata.
        asset_id:
          nullable: true
          description: >-
            The instrument master asset of this contract: the CoinGecko id when
            the asset was resolved strictly (`pepe`), otherwise
            `<class>:<ticker>` (`equity:bb`). Every contract of one asset
            carries the same id, whatever its base_coin spelling. `null` when
            the master does not know the contract.
          type: string
        asset_symbol:
          nullable: true
          description: >-
            The asset ticker as a trader reads it: `PEPE` on the 1000PEPE and
            KPEPE contracts too. `null` when the master does not know the
            contract.
          type: string
        lot_multiplier:
          nullable: true
          description: >-
            Units of the asset per unit the contract quotes: `1000` for Binance
            1000PEPEUSDT, `1` for Gate.io PEPE_USDT. From the venue or a checked
            alias, never parsed from the symbol. `rate` is a fraction of
            notional and needs no scaling. `null` when unknown.
          type: number
        instrument_status:
          nullable: true
          description: >-
            The venue's own status for the contract, as the instruments sync
            last read it. `null` when the master does not know the contract.
          type: string
          enum:
            - trading
            - halted
            - delisted
            - settling
            - pre_launch
        is_live:
          nullable: true
          description: >-
            `true`: trading, and the venue's contract list was read within 30
            minutes. `false`: read within 30 minutes and not trading. `null`:
            unknown (no read in 30 minutes, a status value the sync could not
            interpret, or a contract the master does not know).
          type: boolean
        coverage:
          type: object
          properties:
            1d:
              $ref: '#/components/schemas/FundingWindowCoverage1d'
            7d:
              $ref: '#/components/schemas/FundingWindowCoverage7d'
            30d:
              $ref: '#/components/schemas/FundingWindowCoverage30d'
            90d:
              $ref: '#/components/schemas/FundingWindowCoverage90d'
            1y:
              $ref: '#/components/schemas/FundingWindowCoverage1y'
          required:
            - 1d
            - 7d
            - 30d
            - 90d
            - 1y
          description: >-
            How much of each window (`acc_1d` … `acc_1y`) the contract's
            settlements cover, judged against when it was listed and when it
            stopped trading.
      required:
        - base_coin
        - exchange
        - symbol
        - acc_1d
        - acc_7d
        - acc_30d
        - acc_90d
        - acc_1y
        - settlements_1d
        - settlements_7d
        - settlements_30d
        - settlements_90d
        - settlements_1y
        - first_settled_at
        - last_settled_at
        - asset_class
        - margin_type
        - interval_hours
        - is_active
    FundingHistoryRow:
      type: object
      properties:
        exchange:
          type: string
        symbol:
          type: string
          description: >-
            The contract that settled. A coin can span several contracts per
            venue (a USDT and a USDC perp, or PEPE beside 1000PEPE lots), so
            read series per (exchange, symbol).
        rate:
          type: number
          x-field: funding.settled_rate
          description: >-
            The rate a contract was charged at one funding settlement, as its
            venue reports it, a fraction per the interval that settlement
            covered.
        interval_hours:
          type: number
        settled_at:
          type: string
          format: date-time
          x-field: funding.settled_at
          description: When a contract's funding settlement took place.
      required:
        - exchange
        - rate
        - interval_hours
        - settled_at
    PaginatedEnvelope:
      type: object
      properties:
        data:
          type: array
          items: {}
          description: Endpoint-specific result items.
        pagination:
          $ref: '#/components/schemas/PaginationInfo'
        meta:
          $ref: '#/components/schemas/ApiMeta'
      required:
        - data
        - pagination
        - meta
    FundingCurrentAggregates:
      type: object
      properties:
        summary:
          type: array
          items:
            $ref: '#/components/schemas/FundingAssetSummary'
        extremes:
          $ref: '#/components/schemas/FundingExtremes'
        market:
          $ref: '#/components/schemas/FundingMarketStats'
    FundingAccumulatedAggregates:
      type: object
      properties:
        summary:
          type: array
          items:
            $ref: '#/components/schemas/FundingAccumulatedSummary'
      required:
        - summary
    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
    FundingWindowCoverage1d:
      type: object
      properties:
        coverage_ratio:
          nullable: true
          type: number
          minimum: 0
          maximum: 1
          x-field: funding.window_coverage_1d
          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).
        complete:
          nullable: true
          description: >-
            `coverage_ratio` is at least 0.9; `null` with the ratio. Complete
            means the span the contract was expected in is covered, not the
            whole window: with `halted_within_window` or `listed_within_window`
            true, `acc_*` sums fewer hours than the window (see
            `covered_hours_*`). Compare `acc_*` across contracts only on
            complete windows where both of those are false.
          type: boolean
        listed_within_window:
          type: boolean
          description: >-
            The contract's first settlement ever falls inside the window: a
            short history here is a new listing, not missing data.
        halted_within_window:
          type: boolean
          description: >-
            The contract stopped trading inside the window: the window is
            measured up to that halt. The halt is when the instrument master
            recorded the venue's status leaving trading; when the master has no
            such time (it first saw the contract already halted), it is the last
            settlement plus one interval once the contract's current row stopped
            updating or left the book. `false` when no halt time is known: then
            the window runs to now and missing settlements read as missing.
      required:
        - coverage_ratio
        - complete
        - listed_within_window
        - halted_within_window
    FundingWindowCoverage7d:
      type: object
      properties:
        coverage_ratio:
          nullable: true
          type: number
          minimum: 0
          maximum: 1
          x-field: funding.window_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).
        complete:
          nullable: true
          description: >-
            `coverage_ratio` is at least 0.9; `null` with the ratio. Complete
            means the span the contract was expected in is covered, not the
            whole window: with `halted_within_window` or `listed_within_window`
            true, `acc_*` sums fewer hours than the window (see
            `covered_hours_*`). Compare `acc_*` across contracts only on
            complete windows where both of those are false.
          type: boolean
        listed_within_window:
          type: boolean
          description: >-
            The contract's first settlement ever falls inside the window: a
            short history here is a new listing, not missing data.
        halted_within_window:
          type: boolean
          description: >-
            The contract stopped trading inside the window: the window is
            measured up to that halt. The halt is when the instrument master
            recorded the venue's status leaving trading; when the master has no
            such time (it first saw the contract already halted), it is the last
            settlement plus one interval once the contract's current row stopped
            updating or left the book. `false` when no halt time is known: then
            the window runs to now and missing settlements read as missing.
      required:
        - coverage_ratio
        - complete
        - listed_within_window
        - halted_within_window
    FundingWindowCoverage30d:
      type: object
      properties:
        coverage_ratio:
          nullable: true
          type: number
          minimum: 0
          maximum: 1
          x-field: funding.window_coverage_30d
          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).
        complete:
          nullable: true
          description: >-
            `coverage_ratio` is at least 0.9; `null` with the ratio. Complete
            means the span the contract was expected in is covered, not the
            whole window: with `halted_within_window` or `listed_within_window`
            true, `acc_*` sums fewer hours than the window (see
            `covered_hours_*`). Compare `acc_*` across contracts only on
            complete windows where both of those are false.
          type: boolean
        listed_within_window:
          type: boolean
          description: >-
            The contract's first settlement ever falls inside the window: a
            short history here is a new listing, not missing data.
        halted_within_window:
          type: boolean
          description: >-
            The contract stopped trading inside the window: the window is
            measured up to that halt. The halt is when the instrument master
            recorded the venue's status leaving trading; when the master has no
            such time (it first saw the contract already halted), it is the last
            settlement plus one interval once the contract's current row stopped
            updating or left the book. `false` when no halt time is known: then
            the window runs to now and missing settlements read as missing.
      required:
        - coverage_ratio
        - complete
        - listed_within_window
        - halted_within_window
    FundingWindowCoverage90d:
      type: object
      properties:
        coverage_ratio:
          nullable: true
          type: number
          minimum: 0
          maximum: 1
          x-field: funding.window_coverage_90d
          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).
        complete:
          nullable: true
          description: >-
            `coverage_ratio` is at least 0.9; `null` with the ratio. Complete
            means the span the contract was expected in is covered, not the
            whole window: with `halted_within_window` or `listed_within_window`
            true, `acc_*` sums fewer hours than the window (see
            `covered_hours_*`). Compare `acc_*` across contracts only on
            complete windows where both of those are false.
          type: boolean
        listed_within_window:
          type: boolean
          description: >-
            The contract's first settlement ever falls inside the window: a
            short history here is a new listing, not missing data.
        halted_within_window:
          type: boolean
          description: >-
            The contract stopped trading inside the window: the window is
            measured up to that halt. The halt is when the instrument master
            recorded the venue's status leaving trading; when the master has no
            such time (it first saw the contract already halted), it is the last
            settlement plus one interval once the contract's current row stopped
            updating or left the book. `false` when no halt time is known: then
            the window runs to now and missing settlements read as missing.
      required:
        - coverage_ratio
        - complete
        - listed_within_window
        - halted_within_window
    FundingWindowCoverage1y:
      type: object
      properties:
        coverage_ratio:
          nullable: true
          type: number
          minimum: 0
          maximum: 1
          x-field: funding.window_coverage_1y
          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).
        complete:
          nullable: true
          description: >-
            `coverage_ratio` is at least 0.9; `null` with the ratio. Complete
            means the span the contract was expected in is covered, not the
            whole window: with `halted_within_window` or `listed_within_window`
            true, `acc_*` sums fewer hours than the window (see
            `covered_hours_*`). Compare `acc_*` across contracts only on
            complete windows where both of those are false.
          type: boolean
        listed_within_window:
          type: boolean
          description: >-
            The contract's first settlement ever falls inside the window: a
            short history here is a new listing, not missing data.
        halted_within_window:
          type: boolean
          description: >-
            The contract stopped trading inside the window: the window is
            measured up to that halt. The halt is when the instrument master
            recorded the venue's status leaving trading; when the master has no
            such time (it first saw the contract already halted), it is the last
            settlement plus one interval once the contract's current row stopped
            updating or left the book. `false` when no halt time is known: then
            the window runs to now and missing settlements read as missing.
      required:
        - coverage_ratio
        - complete
        - listed_within_window
        - halted_within_window
    PaginationInfo:
      type: object
      properties:
        cursor:
          nullable: true
          type: string
        has_more:
          type: boolean
        total:
          type: integer
          minimum: 0
      required:
        - cursor
        - has_more
        - total
    FundingAssetSummary:
      type: object
      properties:
        base_coin:
          type: string
          description: >-
            The group's ticker: the coin's asset_symbol when the instrument
            master knows it, else the underlying ticker. Groups follow the
            funding grid: one per instrument and asset class, so `coin=PEPE`
            answers one `PEPE` entry over the PEPE, 1000PEPE and KPEPE
            contracts, KOSTOCK and NCSKKO2USD join KO, and a ticker two asset
            classes share answers one entry per class.
        asset_class:
          type: string
          enum:
            - crypto
            - equity
            - commodity
            - fx
            - index
          x-field: funding.asset_class
          description: >-
            The underlying category an asset's funding contracts are grouped
            under, as the funding grid groups its rows: `crypto`, `equity`,
            `commodity`, `fx` or `index`, so a ticker two classes share (CVX the
            coin and Chevron) is two assets.
        funding_avg_8h:
          nullable: true
          type: number
          x-field: funding.asset_avg_8h
          description: >-
            OI-weighted mean of the 8h-eq rate over the fresh, live primary
            contract of each venue for the asset (weights: one-sided OI) when at
            least two of those venues carry OI and they are a majority of them;
            otherwise the median of the same set (method says which); every
            venue stale → computed over them and flagged allStale. v2
            (2026-09-27) added the majority rule: v1 weighted any two venues
            with OI. v3 (2026-10-31): a trailing 8h rate (Deribit, rateKind
            trailing_8h) counts as stale.
        funding_median_8h:
          nullable: true
          description: >-
            Median of the same venues' 8-hour rates: the companion one venue
            cannot move.
          type: number
        funding_method:
          nullable: true
          description: >-
            How `funding_avg_8h` was reduced: `oi_weighted`, or
            `median_fallback` when too few venues carry open interest. `null`
            with `funding_avg_8h`.
          type: string
          enum:
            - oi_weighted
            - median_fallback
        funding_venues_used:
          type: integer
          description: Venues behind the figures, one primary contract each.
        funding_venues_stale:
          type: integer
          description: >-
            Venues left out because their rate was past the 10-minute freshness
            SLA, or was a `trailing_8h` rate (Deribit), while another venue was
            fresh.
        funding_all_stale:
          type: boolean
          description: >-
            `true` when no venue was fresh: the figures are then over the stale
            rates, and read as such.
        open_interest:
          nullable: true
          type: number
          x-field: oi.funding_book_total
          description: >-
            Σ of the one-sided open interest (oi.contract) of every contract an
            asset has in the funding book, inverse and lot contracts included,
            the asset grouped as the funding grid groups it (instrument and
            asset class) and venues kept out of open-interest totals (MEXC,
            OI_TOTAL_EXCLUSIONS) left out; null when none reports any. Not
            oi.asset_total, which sums every crypto contract
            futures_open_interest holds, by asset symbol.
        next_settlement_at:
          nullable: true
          type: string
          format: date-time
          x-field: funding.next_settlement_at
          description: >-
            An asset's next funding settlement on its venues and the seconds
            until it: the soonest, over its fresh contracts (one per venue), of
            each venue's published next_funding_time still ahead, else the next
            multiple of the contract's own interval from 00:00 UTC, flagged
            estimated (KuCoin, Bitget and HTX publish none); a published time
            wins a tie with an estimate; null when no fresh contract has either.
        next_settlement_estimated:
          nullable: true
          type: boolean
          x-field: funding.next_settlement_estimated
          description: >-
            An asset's next funding settlement on its venues and the seconds
            until it: the soonest, over its fresh contracts (one per venue), of
            each venue's published next_funding_time still ahead, else the next
            multiple of the contract's own interval from 00:00 UTC, flagged
            estimated (KuCoin, Bitget and HTX publish none); a published time
            wins a tie with an estimate; null when no fresh contract has either.
      required:
        - base_coin
        - asset_class
        - funding_avg_8h
        - funding_median_8h
        - funding_method
        - funding_venues_used
        - funding_venues_stale
        - funding_all_stale
    FundingExtremes:
      type: object
      properties:
        highest:
          type: array
          items:
            $ref: '#/components/schemas/FundingCurrentRow'
          description: >-
            Up to N rows with `rate_8h` ≥ 0, highest first, among fresh rows
            with a usable interval that clear `min_oi_usd`. Empty when no such
            row has a rate at or above 0.
        lowest:
          type: array
          items:
            $ref: '#/components/schemas/FundingCurrentRow'
          description: >-
            Up to N rows with `rate_8h` < 0, lowest first, among the same rows.
            A rate at or above 0 is never listed here, so this is empty when no
            eligible rate is below 0.
        omitted:
          type: object
          properties:
            stale:
              type: integer
            no_interval:
              type: integer
            below_floor:
              type: integer
          required:
            - stale
            - no_interval
            - below_floor
          description: >-
            Rows of the scope left out, each under the first check it failed:
            `stale` (past the freshness SLA), `no_interval` (no rate or no
            usable interval), `below_floor` (open interest below `min_oi_usd`,
            or unknown while the floor is above 0).
      required:
        - highest
        - lowest
        - omitted
    FundingMarketStats:
      type: object
      properties:
        funding_apr_mean:
          nullable: true
          description: >-
            Mean 8-hour funding over one primary contract per (venue, asset)
            with a fresh rate, every asset class included (an asset is the
            funding grid's row: PEPE, 1000PEPE and KPEPE are one asset, so a
            venue listing two of its spellings counts once), annualized (×
            1,095): the computation behind `avg_funding_rate` on GET
            /v1/market/derivatives-overview, as an APR and without a key. `null`
            when no contract has a usable rate.
          type: number
        funding_apr_oi_weighted:
          nullable: true
          description: >-
            The same, weighted by each contract's one-sided open interest
            (venues left out of open-interest totals carry no weight). `null`
            when no contract carries open interest, never the mean in its place.
          type: number
        positive:
          type: integer
          description: Primary contracts with a fresh rate above 0 (longs pay shorts).
        negative:
          type: integer
          description: Primary contracts with a fresh rate below 0 (shorts pay longs).
        venue_count:
          type: integer
          x-field: funding.venue_count
          description: >-
            The venues Sharpe tracks (venue_count) and those live in the funding
            book (live_venues): a venue is live when at least one of its
            contracts is fresh, by the row's served is_stale, else by its update
            time within the funding SLA (600 s) of the book's as-of; a tracked
            venue with no row at all is not live.
        live_venues:
          type: integer
          x-field: funding.live_venues
          description: >-
            The venues Sharpe tracks (venue_count) and those live in the funding
            book (live_venues): a venue is live when at least one of its
            contracts is fresh, by the row's served is_stale, else by its update
            time within the funding SLA (600 s) of the book's as-of; a tracked
            venue with no row at all is not live.
      required:
        - funding_apr_mean
        - funding_apr_oi_weighted
        - positive
        - negative
    FundingAccumulatedSummary:
      type: object
      properties:
        base_coin:
          type: string
          description: >-
            The entry's ticker: the coin's asset_symbol when the instrument
            master knows it, else the underlying ticker, as on the type=current
            summary.
        asset_class:
          type: string
          enum:
            - crypto
            - equity
            - commodity
            - fx
            - index
          x-field: funding.asset_class
          description: >-
            The underlying category an asset's funding contracts are grouped
            under, as the funding grid groups its rows: `crypto`, `equity`,
            `commodity`, `fx` or `index`, so a ticker two classes share (CVX the
            coin and Chevron) is two assets.
        acc_median_1d:
          nullable: true
          type: number
          x-field: funding.accumulated_median_1d
          description: >-
            Median of an asset's realised funding in the window
            (funding.accumulated) over its venues whose history covers at least
            90 % of the window, one contract per venue (the funding grid's
            primary); null, never 0, when no venue covers the window.
        acc_median_7d:
          nullable: true
          type: number
          x-field: funding.accumulated_median_7d
          description: >-
            Median of an asset's realised funding in the window
            (funding.accumulated) over its venues whose history covers at least
            90 % of the window, one contract per venue (the funding grid's
            primary); null, never 0, when no venue covers the window.
        acc_median_30d:
          nullable: true
          type: number
          x-field: funding.accumulated_median_30d
          description: >-
            Median of an asset's realised funding in the window
            (funding.accumulated) over its venues whose history covers at least
            90 % of the window, one contract per venue (the funding grid's
            primary); null, never 0, when no venue covers the window.
        acc_median_90d:
          nullable: true
          type: number
          x-field: funding.accumulated_median_90d
          description: >-
            Median of an asset's realised funding in the window
            (funding.accumulated) over its venues whose history covers at least
            90 % of the window, one contract per venue (the funding grid's
            primary); null, never 0, when no venue covers the window.
        acc_median_1y:
          nullable: true
          type: number
          x-field: funding.accumulated_median_1y
          description: >-
            Median of an asset's realised funding in the window
            (funding.accumulated) over its venues whose history covers at least
            90 % of the window, one contract per venue (the funding grid's
            primary); null, never 0, when no venue covers the window.
        acc_apr_median_1d:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_median_1d
          description: >-
            Median of the APRs (funding.accumulated_apr) of the same covered
            venues as funding.accumulated_median, each annualised over its own
            history, so it is not the median sum scaled; null, never 0, when no
            covered venue has an APR.
        acc_apr_median_7d:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_median_7d
          description: >-
            Median of the APRs (funding.accumulated_apr) of the same covered
            venues as funding.accumulated_median, each annualised over its own
            history, so it is not the median sum scaled; null, never 0, when no
            covered venue has an APR.
        acc_apr_median_30d:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_median_30d
          description: >-
            Median of the APRs (funding.accumulated_apr) of the same covered
            venues as funding.accumulated_median, each annualised over its own
            history, so it is not the median sum scaled; null, never 0, when no
            covered venue has an APR.
        acc_apr_median_90d:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_median_90d
          description: >-
            Median of the APRs (funding.accumulated_apr) of the same covered
            venues as funding.accumulated_median, each annualised over its own
            history, so it is not the median sum scaled; null, never 0, when no
            covered venue has an APR.
        acc_apr_median_1y:
          nullable: true
          type: number
          x-field: funding.accumulated_apr_median_1y
          description: >-
            Median of the APRs (funding.accumulated_apr) of the same covered
            venues as funding.accumulated_median, each annualised over its own
            history, so it is not the median sum scaled; null, never 0, when no
            covered venue has an APR.
        carry_spread_apr_1d:
          nullable: true
          type: number
          x-field: funding.carry_spread_apr_1d
          description: >-
            An asset's carry over the window: the highest APR
            (funding.accumulated_apr, as of the rollup's refresh) among its
            qualifying contracts minus the lowest, never negative, where a
            contract qualifies when it is trading, one per venue and spelling,
            its history covers at least 90 % of the window and its open interest
            is at least FLOORS.tradableOiUsd ($1M; unknown fails); null when the
            two legs would be one venue or fewer than two contracts qualify.
        carry_spread_apr_7d:
          nullable: true
          type: number
          x-field: funding.carry_spread_apr_7d
          description: >-
            An asset's carry over the window: the highest APR
            (funding.accumulated_apr, as of the rollup's refresh) among its
            qualifying contracts minus the lowest, never negative, where a
            contract qualifies when it is trading, one per venue and spelling,
            its history covers at least 90 % of the window and its open interest
            is at least FLOORS.tradableOiUsd ($1M; unknown fails); null when the
            two legs would be one venue or fewer than two contracts qualify.
        carry_spread_apr_30d:
          nullable: true
          type: number
          x-field: funding.carry_spread_apr_30d
          description: >-
            An asset's carry over the window: the highest APR
            (funding.accumulated_apr, as of the rollup's refresh) among its
            qualifying contracts minus the lowest, never negative, where a
            contract qualifies when it is trading, one per venue and spelling,
            its history covers at least 90 % of the window and its open interest
            is at least FLOORS.tradableOiUsd ($1M; unknown fails); null when the
            two legs would be one venue or fewer than two contracts qualify.
        carry_spread_apr_90d:
          nullable: true
          type: number
          x-field: funding.carry_spread_apr_90d
          description: >-
            An asset's carry over the window: the highest APR
            (funding.accumulated_apr, as of the rollup's refresh) among its
            qualifying contracts minus the lowest, never negative, where a
            contract qualifies when it is trading, one per venue and spelling,
            its history covers at least 90 % of the window and its open interest
            is at least FLOORS.tradableOiUsd ($1M; unknown fails); null when the
            two legs would be one venue or fewer than two contracts qualify.
        carry_spread_apr_1y:
          nullable: true
          type: number
          x-field: funding.carry_spread_apr_1y
          description: >-
            An asset's carry over the window: the highest APR
            (funding.accumulated_apr, as of the rollup's refresh) among its
            qualifying contracts minus the lowest, never negative, where a
            contract qualifies when it is trading, one per venue and spelling,
            its history covers at least 90 % of the window and its open interest
            is at least FLOORS.tradableOiUsd ($1M; unknown fails); null when the
            two legs would be one venue or fewer than two contracts qualify.
      required:
        - base_coin
        - asset_class
        - acc_median_1d
        - acc_median_7d
        - acc_median_30d
        - acc_median_90d
        - acc_median_1y
        - acc_apr_median_1d
        - acc_apr_median_7d
        - acc_apr_median_30d
        - acc_apr_median_90d
        - acc_apr_median_1y
        - carry_spread_apr_1d
        - carry_spread_apr_7d
        - carry_spread_apr_30d
        - carry_spread_apr_90d
        - carry_spread_apr_1y
  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.
    X-Data-Source:
      schema:
        type: string
      description: >-
        The sources behind the rows, comma-separated source ids (e.g.
        `binance,bybit`): `meta.source`. /v1/funding/rates and
        /v1/rwa-perps/rates send the origin tier instead, `live` or `supabase`.
    X-Data-Stale:
      schema:
        type: boolean
      description: >-
        True when the data is past its freshness SLA (`meta.freshness_status` is
        not `fresh`), judged for the answer as a whole; rows keep their own
        staleness flags. /v1/funding/rates and /v1/rwa-perps/rates set it when
        the response is empty or at least one returned row exceeds the published
        freshness target.
    X-Data-As-Of:
      schema:
        type: string
        format: date-time
      description: >-
        When the data was current: `meta.as_of` (the newest live row, the
        snapshot or refresh time, or the fetch time). /v1/funding/rates and
        /v1/rwa-perps/rates: the newest source timestamp in the response.
    X-Freshness-Sla-Seconds:
      schema:
        type: integer
      description: >-
        The dataset's freshness SLA in seconds (`meta.freshness_sla_seconds`):
        the writer's cadence plus one skipped run.
    X-Coverage-Start:
      schema:
        type: string
        format: date-time
      description: >-
        Oldest source timestamp represented in the response. Sent on
        type=history; absent when the window returned no rows.
    X-Requested-Start:
      schema:
        type: string
        format: date-time
      description: Start of the window the days parameter asked for, on type=history.
    X-Coverage-Complete:
      schema:
        type: boolean
      description: >-
        False when the returned series starts more than 7 days after
        X-Requested-Start, or returned no rows at all. A short history is a 200
        either way, so the shortfall is stated here rather than inferred.
    X-Days-Clamped:
      schema:
        type: boolean
      description: >-
        True when days exceeded the 1095-day ceiling and the window was
        shortened. Always false on /v1, which rejects an out-of-range days value
        with a 400 instead of clamping it.
    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.