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

# Spot-perp arbitrage

> Returns spot-perpetual funding-capture rows with live funding, verified spot or margin availability, diagnostic basis, gross APR, and net APR after the venue's taker fees, the adverse entry basis and (where public) the borrow cost of a reverse carry. Executable rows (both legs priced, one instrument within 5%, fresh quotes, depth reported on both legs covering $10,000) rank first, then rows whose only gap is unproven depth (`no_spot_depth`: spot prices are last trades with no book, so this is every clean row today), then the other indicative rows.



## OpenAPI

````yaml /openapi.json get /v1/arbitrage/spot-perp
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/arbitrage/spot-perp:
    get:
      tags:
        - Arbitrage
      summary: Spot-perp arbitrage
      description: >-
        Returns spot-perpetual funding-capture rows with live funding, verified
        spot or margin availability, diagnostic basis, gross APR, and net APR
        after the venue's taker fees, the adverse entry basis and (where public)
        the borrow cost of a reverse carry. Executable rows (both legs priced,
        one instrument within 5%, fresh quotes, depth reported on both legs
        covering $10,000) rank first, then rows whose only gap is unproven depth
        (`no_spot_depth`: spot prices are last trades with no book, so this is
        every clean row today), then the other indicative rows.
      operationId: getSpotPerpArbitrage
      parameters:
        - name: exchange
          in: query
          description: Filter by exchange name, or "all" for all exchanges.
          schema:
            default: all
            type: string
        - name: direction
          in: query
          description: >-
            Filter by perpetual-leg direction: short for positive funding
            capture, long for negative funding capture.
          schema:
            default: all
            type: string
            enum:
              - all
              - long
              - short
        - name: minOiUsd
          in: query
          description: >-
            Minimum open interest in USD on the perpetual leg
            (`perpOpenInterestUsd`). Default 0 (no floor). A row whose open
            interest is unknown fails a positive floor, and so does a row on a
            venue left out of the API's open-interest totals (MEXC:
            `openInterestExcludedVenues` elsewhere), whose stored value is kept
            on the row.
          schema:
            default: 0
            type: number
            minimum: 0
        - name: limit
          in: query
          description: >-
            Rows per page (1-1000), in board order. Omitted with no `cursor`:
            every row. On v1 a paged answer carries `pagination`.
          schema:
            type: integer
            minimum: 1
            maximum: 1000
        - name: cursor
          in: query
          description: >-
            Opaque cursor from the previous page's `pagination.cursor` (100 rows
            a page when `limit` is omitted).
          schema:
            type: string
        - $ref: '#/components/parameters/FormatParam'
      responses:
        '200':
          description: Arbitrage opportunities returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpotPerpArbitrageResponse'
          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-Missing:
              $ref: '#/components/headers/X-Data-Missing'
            X-Data-Venues:
              $ref: '#/components/headers/X-Data-Venues'
        '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:
    SpotPerpArbitrageResponse:
      anyOf:
        - allOf:
            - $ref: '#/components/schemas/SuccessEnvelope'
            - type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/SpotPerpOpportunity'
              required:
                - data
        - allOf:
            - $ref: '#/components/schemas/PaginatedEnvelope'
            - type: object
              properties:
                data:
                  type: array
                  items:
                    $ref: '#/components/schemas/SpotPerpOpportunity'
              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
    SpotPerpOpportunity:
      type: object
      properties:
        symbol:
          type: string
        exchange:
          type: string
        fundingRate:
          type: number
          description: Funding rate as a decimal fraction per settlement interval.
        cumRate7d:
          nullable: true
          type: number
        apr:
          type: number
          description: Annualized funding return as a decimal fraction (0.30 = 30%).
        basisRate:
          nullable: true
          description: Spot/perpetual basis as a decimal fraction (0.001 = 0.1%).
          type: number
        netApr:
          nullable: true
          description: >-
            Annualized return after one-time costs, a decimal fraction (0.30 =
            30%): `apr` − (2 spot + 2 perp taker fills at the venue's fee + the
            adverse entry basis at the quoted sides) × 365 / 30 − the base
            coin's borrow APR on a sell-spot row when it is known. A favourable
            entry basis is never credited. Null when a leg is unpriced
            (`pairStatus` `unpriced`) or the spot and perp prices are more than
            20% apart (larger / smaller − 1 > 0.20: two instruments under one
            ticker).
          type: number
        intervalHours:
          type: number
        direction:
          type: string
          enum:
            - long
            - short
        portfolio:
          type: object
          properties:
            spotSide:
              type: string
              enum:
                - buy
                - sell
            perpSide:
              type: string
              enum:
                - long
                - short
          required:
            - spotSide
            - perpSide
        nextFundingTime:
          nullable: true
          type: string
          format: date-time
        perpSymbol:
          type: string
          description: >-
            The venue's perpetual contract the row trades (its own symbol, e.g.
            `1000PEPEUSDT`).
        perpOpenInterestUsd:
          nullable: true
          description: >-
            One-sided open interest of that perpetual in USD: the venue ticker's
            figure, else the latest stored open interest of the contract (at
            most ~10 minutes old). `null` when neither is known, never 0.
          type: number
        fundingIsStale:
          type: boolean
          description: >-
            `true` when `fundingAsOf` is older than the funding book's 10-minute
            freshness SLA at the time of the request.
        executionStatus:
          type: string
          enum:
            - executable
            - indicative
          description: >-
            `executable` when both legs are priced, they are one instrument
            within 5% of each other (the spot price against the perp's index,
            else mark, else last price, per asset unit), a sell-spot row's
            borrow rate is known and in `netApr`, both quotes are within the
            board's 10-minute SLA at the time of the request, and top-of-book
            depth on both legs is reported and covers $10,000; `indicative`
            otherwise, with `indicativeReason`: its figures stand, but it is not
            a verified trade. The board reads spot prices as last trades with no
            book, so no row is executable today: a row that passes every other
            check is `no_spot_depth`.
        pairStatus:
          type: string
          enum:
            - eligible
            - unpriced
            - identity_mismatch
            - not_live
            - contract_type
            - margin_type
            - price_gap
          description: >-
            Whether the spot and perpetual legs are one instrument: `eligible`,
            `unpriced` when either leg has no price to check, else the first
            check that failed: `identity_mismatch` (the instrument master places
            the legs on different assets), `price_gap` (prices more than 20%
            apart).
        fundingAsOf:
          nullable: true
          description: >-
            When the funding rate behind the row was written; `null` when
            unknown.
          type: string
          format: date-time
        pricesAsOf:
          nullable: true
          description: >-
            When the older of the spot and perpetual prices behind `basisRate`
            was read; `null` when the row has neither price.
          type: string
          format: date-time
        indicativeReason:
          nullable: true
          description: >-
            Why the row is `indicative`; `null` when executable. `price_gap`:
            the legs are 5-20% apart (a net APR is still computed) or more than
            20% (none); `stale_quote`: a leg's quote is older than the board's
            10-minute SLA at the time of the request; `borrow_unpriced`: a
            sell-spot / long-perp row whose borrow rate the venue does not
            publish (`netApr` excludes that interest, so the row ranks after
            executable rows); `borrow_limit`: a sell-spot / long-perp row whose
            venue borrow limit for the coin (a no-VIP account; Bybit, OKX,
            Binance in coin units valued at the spot price, Gate.io in USDT) is
            under $10,000, so the short-spot leg cannot be opened at the
            notional (a venue that publishes no limit is not demoted);
            `thin_book`: the perp's top-of-book depth on the side the trade hits
            is under $10,000; `oi_below_notional`: the perp reports open
            interest under $10,000; `no_spot_depth`: every other check passes
            but the spot leg is a last trade with no book behind it, so the fill
            is unproven (these rows rank right after the executable ones);
            `no_depth`: likewise for a perp leg that reports no size.
          type: string
          enum:
            - unpriced
            - identity_mismatch
            - not_live
            - contract_type
            - margin_type
            - price_gap
            - stale_quote
            - borrow_unpriced
            - borrow_limit
            - thin_book
            - no_spot_depth
            - no_depth
            - oi_below_notional
        entryBasisRate:
          nullable: true
          description: >-
            The entry basis at the quoted sides, positive when favourable: buy
            spot / short perp (perp bid − spot) / spot; sell spot / long perp
            (spot − perp ask) / perp ask. Spot is the venue's last trade; perp
            prices per asset unit. Only a negative value is charged in `netApr`.
          type: number
        roundTripFeeRate:
          nullable: true
          description: >-
            Two spot and two perpetual taker fills at the venue's standard (VIP
            0) fee, a decimal fraction of notional.
          type: number
        breakEvenDays:
          nullable: true
          description: >-
            Days of carry that pay back the one-time costs: (fees + adverse
            entry basis) ÷ ((`apr` − `borrowApr`) / 365). `null` without a
            `netApr`.
          type: number
        requiresBorrow:
          type: boolean
          description: >-
            `true` on a sell-spot / long-perp row: the base coin must be
            borrowed on margin.
        borrowCostIncluded:
          type: boolean
          description: >-
            `true` when the borrow interest is subtracted from `netApr` (the
            venue publishes the rate); `false` when the row needs a borrow whose
            rate is unknown (`netApr` then overstates the carry by that
            interest, and the row is `indicative` `borrow_unpriced`), and on
            rows that need none.
        borrowApr:
          nullable: true
          description: >-
            The borrow interest subtracted from `netApr`, a decimal fraction per
            year; `null` when none is.
          type: number
        apr7d:
          nullable: true
          description: >-
            What the last 7 days of settlements paid this row's direction,
            annualized: `cumRate7d` × 365 / 7, sign flipped for a long-perp row.
            Negative when the 7-day carry ran against the direction; `null`
            without `cumRate7d`.
          type: number
        carrySignFlip7d:
          nullable: true
          description: >-
            `true` when `apr7d` is negative: the current rate's direction lost
            money over the last 7 days. The board still ranks on the current
            rate.
          type: boolean
        perpLotMultiplier:
          nullable: true
          description: >-
            Asset units per perpetual contract unit (1000 for `1000PEPEUSDT`,
            whose row `symbol` is PEPE); `null` when the instrument master does
            not know the contract.
          type: number
        spotPriceAsOf:
          nullable: true
          description: When the spot price was read; `null` without one.
          type: string
          format: date-time
        perpPriceAsOf:
          nullable: true
          description: >-
            When the venue's perpetual ticker was read; `null` without a perp
            price.
          type: string
          format: date-time
      required:
        - symbol
        - exchange
        - fundingRate
        - cumRate7d
        - apr
        - basisRate
        - netApr
        - intervalHours
        - direction
        - portfolio
        - nextFundingTime
    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
    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
    PaginationInfo:
      type: object
      properties:
        cursor:
          nullable: true
          type: string
        has_more:
          type: boolean
        total:
          type: integer
          minimum: 0
      required:
        - cursor
        - has_more
        - total
  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-Missing:
      schema:
        type: string
      description: >-
        Each configured venue that is not a quoted member of the board,
        comma-separated `Venue:reason`: `not_live` (the instrument master says
        every contract is halted; the venue is not asked), `stale` (no funding
        row inside the funding SLA), `no_ticker` (rows served unpriced: the
        venue has no bulk ticker, or its fetch failed). Absent when every venue
        is a quoted member.
    X-Data-Venues:
      schema:
        type: string
      description: >-
        The venues a venue filter may offer, comma-separated: the configured
        venues the instrument master does not call not live.
    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.