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

# Perp vs Dated Carry API

> Compare perpetual funding expected through expiry against dated-futures basis to rank carry opportunities with APR, venue, and contract context from Sharpe.

Compare the funding a perpetual is expected to pay until a dated contract expires against the dated contract's basis to that perp. Short the perp and buy the dated contract when funding beats the basis (Perp Carry); buy the perp and short the dated contract when the basis beats funding (Dated Cash-and-Carry).

***

## List perp-dated carry rows

`GET /v1/arbitrage/perp-dated-carry`

Each row pairs a perp (Binance, OKX, Bybit, Bitget, Hyperliquid, Aster, Kraken, Deribit and other funding venues) with a dated contract of the same coin and margin type. The legs are usually on two venues (`crossVenue: true`): two accounts, each collateralized separately, and the board does not price moving collateral between them.

The dated leg comes from the 5-minute dated-quotes snapshot (dataset `arbitrage_dated_quotes`, written by the arbitrage-boards cron with top-20 book walks) for every venue whose quotes there are at most 10 minutes old, else from the hourly term-structure snapshot (stale after 2 hours). The perp leg is the funding book and its 7-day sums, with the live funding rates and the perp's own book that the same cron run read into that snapshot, so both legs are seconds apart and 0 to 5 minutes old, and no request waits on an exchange for the perp. The answer's `as_of` is its oldest input, which on the snapshot is that run's own time; its SLA is the dated-quotes snapshot's 600 seconds (cached up to `s-maxage=100, stale-while-revalidate=200`) when that snapshot priced it, else the term structure's 7,200 seconds. Without a current snapshot the board is served from the funding book alone with every perp leg priced on a reference (`indicativeReason: no_perp_book`), marked degraded and never cached. When the stored term snapshot is past its one-hour pairing window, empty, or reference-only, the scanner reads the dated venues live (`meta.source: "live"`) and merges per venue. A failed data-store read returns `503` (`service_unavailable`, `Retry-After: 30`).

Order: rows at least 3 days from expiry first, then `nearExpiry` rows; within each group executable rows, then rows executable on a live read (`indicativeReason: snapshot_quote`), then every other indicative row, each by `netCarryApr`, highest first.

### Query parameters

**coin** `string`

Optional base coin.

**exchanges** `string`

Comma-separated exchange filter applied to funding and dated-futures venues.

**minNet** `number`

Minimum `netCarryApr` (the fee-adjusted annualized net carry, not the edge to expiry), as a fraction (`0.05` is 5%).

**minOiUsd** `number`

Minimum open interest in USD when available.

**minVolumeUsd** `number`

Minimum 24h futures volume in USD when available.

**minDepthUsd** `number`

Minimum executable depth in USD when depth is available.

**marginType** `string`

Futures margin filter: `linear`, `inverse`, or `both`.

**notional** `number`

Position notional in USD. Defaults to 10000. A row is `executable` only when the depth on both sides the trade hits, any reported open interest and the dated contract's 24h volume are at least this notional. `minDepthUsd` filters rows out instead.

**limit** `integer`

Rows per page. Defaults to 100.

**cursor** `string`

Opaque cursor from the previous page.

```bash cURL theme={null}
curl -G https://www.sharpe.ai/api/v1/arbitrage/perp-dated-carry \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -d coin=ETH \
  -d exchanges=Bybit
```

```json Response theme={null}
{
  "data": {
    "rows": [
      {
        "rank": 1,
        "coin": "ETH",
        "perpVenue": "Bybit",
        "datedVenue": "Bybit",
        "datedContract": "ETHUSDT-27MAR27",
        "expiry": "2027-03-27T08:00:00.000Z",
        "days": 180.979167,
        "perpFundingApr": 0.1095,
        "expectedFundingToExpiry": 0.04912857,
        "datedBasis": 0.02963969,
        "carryEdge": 0.01948888,
        "netCarryEdge": 0.01728888,
        "grossCarryApr": 0.03930531,
        "netCarryApr": 0.03486834,
        "bestLeg": "Perp Carry",
        "nextFunding": "2026-09-27T10:30:00.000Z",
        "executableDepthUsd": 120000,
        "minOpenInterestUsd": 60000000,
        "oiDepthUsd": 120000,
        "executionStatus": "indicative",
        "indicativeReason": "snapshot_quote",
        "direction": "Short perp / Long dated",
        "crossVenue": false,
        "nearExpiry": false,
        "funding7dApr": 0.09907143,
        "funding7dCumulative": 0.0019,
        "fundingProjection": "7d_average",
        "fundingIntervalHours": 8,
        "fundingSettlementsToExpiry": 543,
        "datedLegPrice": 4120.412,
        "perpLegPrice": 4001.7999,
        "fees": 0.0022,
        "updatedAt": "2026-09-27T08:03:00.000Z",
        "isStale": false
      }
    ],
    "scannerMeta": {
      "kind": "perp-dated-carry",
      "status": "ok",
      "source": "supabase",
      "freshnessSlaSeconds": 7200,
      "notionalUsd": 10000
    },
    "pagination": { "cursor": null, "has_more": false, "total": 1 }
  },
  "meta": {
    "request_id": "req_abc123def456ghij",
    "timestamp": "2026-09-27T08:30:00.000Z",
    "elapsed_ms": 16
  }
}
```

***

## Formula

The basis is measured against the **perp**, not spot, at the sides the chosen trade hits:

* Perp Carry (short perp / long dated): `datedBasis = F_ask / P_bid − 1`
* Dated Cash-and-Carry (long perp / short dated): `datedBasis = F_bid / P_ask − 1`

Without a book for the perp's own contract, mark or last prices stand in and the row is indicative `no_perp_book`. Coin-margined perps (Binance COIN-M, Bybit inverse) and edgeX, ApeX and GRVT perps are read from their own books since 2026-10-31.

`perpFundingApr = fundingRate × 8760 / fundingIntervalHours` (the perp's own interval). Rows with the same `coin` and `perpVenue` can carry different perps (a USDT-margined and an inverse contract), and a row does not name its perp contract. `funding7dApr = acc_7d × 365 / 7`, the 7-day realised funding annualized; `funding7dCumulative` is `acc_7d` itself.

`expectedFundingToExpiry = projected rate per settlement × fundingSettlementsToExpiry`, the settlements on the perp's own grid from its next settlement to the expiry instant. The projected rate is the 7-day realised average (`fundingProjection: 7d_average`); under 3 days to expiry, or without a current 7-day sum, it is the current print (`current_print`).

`carryEdge = expectedFundingToExpiry − datedBasis`

`fees = 2 × perp taker fee + 2 × dated taker fee`, each at its venue's standard rate. Not annualized.

`netCarryEdge = carryEdge − fees` for Perp Carry, `−carryEdge − fees` for Dated Cash-and-Carry. `bestLeg` and `direction` name the trade with the larger edge.

`netCarryApr = netCarryEdge × 365 / days`; `grossCarryApr` is the edge before fees, annualized. Both may be negative. `minNet` and ranking use `netCarryApr`.

Every rate is a fraction: the APRs per year (`0.05` is 5%); the basis, edges and expected funding to expiry, and the fees, of the notional.

`executableDepthUsd` is the smaller of the depth on the dated side and the perp side the trade hits; `null` when the perp has no book. `minOpenInterestUsd` is the smaller of the two legs' open interest. `oiDepthUsd` remains only as a backward-compatible mixed fallback. `funding7dStabilityPct`, a deprecated alias of the 7-day cumulative funding (never a stability figure), was removed on 2026-10-31: read `funding7dCumulative`.

Before 2026-09-30, `datedBasis` was measured against spot and `expectedFundingToExpiry` extrapolated the current funding print (`perpFundingApr × days / 365`).

A row is `executable` only when all of these hold; otherwise it is `indicative` and `indicativeReason` names the first check that failed:

| `indicativeReason` | The check that failed |
| - | - |
| `stale_snapshot` | Both legs are inside the 2-hour freshness SLA. |
| `no_perp_book` | The perp has a bid and ask for its own contract. |
| `no_depth` | The depth on both sides the trade hits is known. |
| `depth_below_notional` | That depth is at least `notional`. |
| `oi_below_notional` | The smaller leg's open interest, when reported, is at least `notional`. |
| `no_volume` | The dated contract's 24h volume is known and at least `notional`. |
| `snapshot_quote` | Every other check passes, but a quote is older than 10 minutes: executable on a live read. |

Rows under 3 days to expiry are served with `nearExpiry: true` and ranked after every other row. Borrow cost, the cost of moving collateral between two venues, and market impact beyond the displayed depth are not modelled.


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