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

> Retrieve current, accumulated, and historical funding rates across 35 perpetual futures exchanges with symbol, venue, and timestamp context.

Funding rates are the periodic payments exchanged between long and short traders on perpetual futures contracts. The Sharpe API aggregates funding rates from 35 exchanges (centralized venues and perp DEXs) into a unified format through a single endpoint with a `type` parameter. `GET /v1/funding/rates` returns the authoritative venue set: every distinct `exchange` value in that response is queryable.

> [!NOTE]
>
> The funding book is not crypto-only. Tokenized equity, commodity, index and FX
> perps trade on the same venues and are returned by default. Every row carries
> an `asset_class`; pass `asset_class=crypto` to exclude the rest.

> [!NOTE]
>
> `rate` is a **fraction**, not a percent, and it is charged once per
> `interval_hours`. Annualize with `rate × (24 / interval_hours) × 365`.
> Intervals differ per contract. The live book contains 1h, 2h, 4h, 8h and 24h
> contracts, and the same venue runs different intervals on different symbols.
> Never assume 8 hours.

> [!NOTE]
>
> `coin` names an asset (since 2026-09-27). It used to match the `base_coin`
> string, so `coin=PEPE` missed every PEPE contract a venue lists as
> `1000PEPE` or `KPEPE`; it now returns all of them, and `coin=1000PEPE`
> returns the same set. Rows carry `asset_id`, `asset_symbol`,
> `lot_multiplier`, `instrument_status` and `is_live` from Sharpe's instrument
> master, so a client never has to parse a symbol to tell a lot contract or a
> halted market apart. The five fields are `null` for a contract the master
> does not know yet. `rate` is a fraction of notional, so lot contracts compare
> with the rest without rescaling.

***

## Get funding rates

`GET /v1/funding/rates`

A single endpoint that returns current snapshots, accumulated sums, or historical time series depending on the `type` parameter.

### Query parameters

**type** `string`

The kind of funding rate data to return. One of `current`, `accumulated`, `history`. Defaults to `current`.

**coin** `string`

The coin: a ticker (`BTC`, `ETH`, `PEPE`), a lot or venue spelling (`1000PEPE`, `kPEPE`) or the coin's full name (`bitcoin` resolves to `BTC`). Case-insensitive, one coin per request. `coin` names an asset, not a `base_coin` string: every contract of the asset comes back whatever its `base_coin` spelling, so `PEPE`, `1000PEPE` and `kpepe` all return the PEPE contracts listed as `PEPE`, `1000PEPE` and `KPEPE` (read `lot_multiplier`). A ticker two assets share (`BB` is BounceBit and BlackBerry) returns both; narrow with `asset_class`. Optional for `current` and `accumulated`. **Required** for `history`. A value no perpetual has ever settled returns a 400 error naming what was tried, rather than an empty result set that reads as "this coin has no funding data"; a coin delisted from every venue still resolves, so its history stays queryable. `GET /v1/funding/coins` lists every ticker carried.

**days** `integer`

Lookback window in days for `type=history`. Integer from `1` to `1095`. Defaults to `30`. Ignored for other types.

**exchange** `string`

Narrows the response to one venue. Accepts the slug (`gate-io`), the display name exactly as returned in the `exchange` field (`Gate.io`), or the ccxt id. Every venue Sharpe fetches is addressable. The registry is not frozen, so read the current list from an unfiltered response rather than hardcoding one. An unrecognized value returns a 400 error.

**asset\_class** `string`

Narrows the response to one underlying category. One of `crypto`, `equity`, `commodity`, `fx`, `index`. Unfiltered by default, so the response carries tokenized equity, commodity, index and FX perps alongside crypto. Applies to type=current and type=accumulated; ignored for type=history. An unrecognized value returns a 400 error.

**margin** `string`

Narrows 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 a 400 error.

**limit** `integer`

Maximum number of results per page. `1` to `5000`. When provided, the response includes a `pagination` object with cursor-based paging.

**cursor** `string`

Opaque cursor for fetching the next page. Returned in the `pagination.cursor` field of paginated responses.

**sort** `string`

For type=current: orders the rows by their open interest before the page is cut. One of `open_interest` (ascending), `-open_interest` (descending). Rows whose open interest is unknown come last either way. Omit it to keep the book's order (base coin, venue, symbol).

**extremes** `integer`

For type=current: an integer from `1` to `100`. Answers with up to N highest rows (`rate_8h` ≥ 0) and up to N lowest rows (`rate_8h` \< 0) instead of the rows (see "Aggregates" below). The other filters narrow the rows first. Cannot be combined with `limit`, `cursor` or `sort`.

**min\_oi\_usd** `number`

For type=current, with `extremes` only: leaves out rows whose open interest in USD is below this floor. A row with unknown open interest fails any floor above `0`. Passing it without `extremes` returns a 400 error.

**stats** `string`

For type=current: set to `1` to answer with the whole book's funding (`market`), and how many tracked venues are live, instead of the rows. Cannot be combined with `coin`, `exchange`, `margin`, `asset_class`, `limit`, `cursor` or `sort`.

**summary** `string`

For type=current or type=accumulated, with `coin`: set to `1` to answer with the coin's funding across venues (`summary`) instead of the rows: on type=current its average rate, open interest and next settlement, on type=accumulated its medians and carry spread per window. Cannot be combined with `limit`, `cursor` or `sort`.

```bash cURL theme={null}
curl -G https://www.sharpe.ai/api/v1/funding/rates \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -d type=current
```

```ts TypeScript theme={null}
const res = await fetch(
  'https://www.sharpe.ai/api/v1/funding/rates?type=current',
  {
    headers: {
      Authorization: 'Bearer sk_live_your_key_here',
    },
  },
)
const { data } = await res.json()
```

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

resp = requests.get(
    "https://www.sharpe.ai/api/v1/funding/rates",
    headers={"Authorization": "Bearer sk_live_your_key_here"},
    params={"type": "current"},
)
data = resp.json()["data"]
```

***

## type=current

Returns the latest funding rate snapshot for every exchange-symbol pair. Stale entries older than 6 hours are automatically excluded.

Every scope is answered from the book the funding job writes every 5 minutes. `meta.as_of` is the newest write among live contracts in the scope, and `X-Data-Stale` judges it against the 10-minute SLA, so one halted venue's frozen rows never mark the rest of the book stale (each row still carries its own `is_stale`). A scope that matches no contract is dated by the book; a scope of only halted or delisted markets has no `as_of` and says so in `meta.warnings`. When the database read fails, the answer comes from the last written book at any age, flagged `X-Data-Fallback: snapshot` and never cached. With nothing to serve the endpoint returns `503` (`service_unavailable`, `Retry-After: 30`). A repeated keyed request is answered from a 100-second memo while the book is fresh.

### Response fields

**exchange** `string`

The venue's display name, in its exact stored casing: `Binance`, `Bybit`, `OKX`, `Gate.io`, `Crypto.com`, `WhiteBIT`, `edgeX`, `tradeXYZ`. Match on these values, not lowercase slugs.

**symbol** `string`

The trading pair symbol on the exchange (e.g., `BTCUSDT`, `ETHUSDT`).

**base\_coin** `string`

The base ticker as stored for this contract (e.g., `BTC`, `ETH`). Lot spellings are kept (`1000PEPE`, `KPEPE`), so one asset can appear under several; group contracts by `asset_id`.

**rate** `number`

The funding rate as a fraction charged once per `interval_hours` (e.g., `0.0001` = 0.01% per interval). Not a percentage and not annualized. What it measures depends on the venue, named by `rate_kind`: on most venues it is the in-progress estimate for the settlement at `next_funding_time`, which moves until then and can differ from what the venue last charged by a multiple or in sign; on Kraken, Crypto.com and Bitfinex it is the rate charged at the last settlement; on Deribit it is the funding realised over the trailing 8 hours. Settled rates are served by `type=history`.

**predicted\_rate** `number | null`

The venue's own forecast for the coming settlement, published beside `rate` only by Kraken, Crypto.com (an estimate for the next 4-hour interval, not the next hourly settlement), Pacifica and Hyperliquid (where it equals `rate`). `null` everywhere else, including Binance, Bybit and OKX.

**interval\_hours** `number`

Hours between funding settlements for this specific contract. The live book contains `1`, `2`, `4`, `8` and `24`; a single venue can run several intervals across its symbols, so read this per row rather than assuming `8`.

**next\_funding\_time** `string | null`

ISO 8601 timestamp of the next scheduled funding settlement. `null` on venues that do not publish one.

**updated\_at** `string`

ISO 8601 timestamp when this rate was last refreshed.

**margin\_type** `string`

Collateral convention for the contract: `linear` (quote-margined) or `inverse` (coin-margined).

**asset\_class** `string`

Underlying category: `crypto`, `equity`, `commodity`, `fx` or `index`. Tokenized-equity perps such as Bybit `TSLL` are `equity`, not `crypto`.

**open\_interest** `number | null`

Latest one-sided USD open interest (each contract counted once) of this contract, matched on `(exchange, symbol)`: two contracts of one coin on one venue carry their own figures. `null` when no open-interest row matched: a minority of rows, mostly on the venues Sharpe captures no open interest for. Never `0` as a stand-in for missing.

**market\_cap\_rank** `integer | null`

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.

**age\_seconds** `number | null`

Age of the row when the response was generated. `null` means the source timestamp was invalid or unavailable.

**data\_source** `string`

Snapshot provenance. Current database responses use `supabase`.

**freshness\_sla\_seconds** `number`

Operational stale threshold for current rates. The writer runs every 5 minutes and allows a 5-minute grace window, so this is currently `600` seconds.

**is\_stale** `boolean`

`true` when the row is older than the published freshness target. Rows up to the backwards-compatible six-hour cutoff can therefore be returned while explicitly marked stale.

**asset\_id** `string | null`

The asset this contract belongs to in Sharpe's instrument master: the CoinGecko id when the asset was resolved strictly (`bitcoin`, `pepe`), otherwise `<class>:<ticker>` (`equity:bb` for BlackBerry). Every contract of one asset carries the same id whatever its `base_coin` spelling, so group or join on this, never on `base_coin`. `null` when the master does not know the contract yet.

**asset\_symbol** `string | null`

The asset's ticker as a trader reads it: `PEPE` on the `1000PEPE` and `KPEPE` contracts too. `null` when the master does not know the contract.

**lot\_multiplier** `number | null`

Units of the asset per unit the contract quotes: `1000` for Binance `1000PEPEUSDT` (its price and size are per 1,000 PEPE); `1` for Gate.io `PEPE_USDT`. Taken from the venue or a checked alias, never parsed from the symbol. `rate` needs no scaling. `null` when unknown.

**instrument\_status** `string | null`

The venue's own status for the contract as Sharpe's instruments sync last read it: `trading`, `halted`, `delisted`, `settling` or `pre_launch`. `null` when the master does not know the contract.

**is\_live** `boolean | null`

`true` when the contract is trading and the venue's contract list was read in the last 30 minutes; `false` when it was read and the contract is not trading (halted, settling, delisted or not launched); `null` when that is unknown: no read in 30 minutes, a status value Sharpe could not interpret, or a contract the master does not know. Read `null` as unknown, never as halted.

**rate\_8h** `number | null`

`rate` on the 8-hour basis: `rate × 8 / interval_hours`, so contracts on different intervals compare directly. `null` when the row has no rate or an interval Sharpe does not recognise; never computed from an assumed 8 hours.

**apr** `number | null`

`rate` annualized over the row's own interval: `rate × 8760 / interval_hours`, a fraction (`0.1` = 10%), signed like `rate`. `null` when `rate_8h` is.

**rate\_kind** `string`

What `rate` (and so `rate_8h` and `apr`) measures on this venue: `estimate`, the in-progress rate for the settlement at `next_funding_time` (most venues, Binance, Bybit, OKX and Hyperliquid among them); `last_settled`, the rate charged at the last settlement, `next_funding_time − interval_hours` (Kraken, Crypto.com, Bitfinex); `trailing_8h`, funding realised over the last 8 hours, with `next_funding_time` on a synthetic 00:00/08:00/16:00 UTC grid (Deribit).

```json title="Response (type=current)" theme={null}
{
  "data": [
    {
      "exchange": "Binance",
      "symbol": "BTCUSDT",
      "base_coin": "BTC",
      "rate": 0.0001,
      "predicted_rate": null,
      "interval_hours": 8,
      "next_funding_time": "2026-03-27T08:00:00Z",
      "updated_at": "2026-03-27T07:45:00Z",
      "margin_type": "linear",
      "asset_class": "crypto",
      "open_interest": 1284000000,
      "market_cap_rank": 1,
      "age_seconds": 0,
      "data_source": "supabase",
      "freshness_sla_seconds": 600,
      "is_stale": false,
      "asset_id": "bitcoin",
      "asset_symbol": "BTC",
      "lot_multiplier": 1,
      "instrument_status": "trading",
      "is_live": true,
      "rate_8h": 0.0001,
      "apr": 0.1095,
      "rate_kind": "estimate"
    },
    {
      "exchange": "Gate.io",
      "symbol": "BTC_USDT",
      "base_coin": "BTC",
      "rate": 0.00012,
      "predicted_rate": null,
      "interval_hours": 8,
      "next_funding_time": "2026-03-27T08:00:00Z",
      "updated_at": "2026-03-27T07:44:30Z",
      "margin_type": "linear",
      "asset_class": "crypto",
      "open_interest": null,
      "market_cap_rank": 1,
      "age_seconds": 30,
      "data_source": "supabase",
      "freshness_sla_seconds": 600,
      "is_stale": false,
      "asset_id": "bitcoin",
      "asset_symbol": "BTC",
      "lot_multiplier": 1,
      "instrument_status": "trading",
      "is_live": true,
      "rate_8h": 0.00012,
      "apr": 0.1314,
      "rate_kind": "estimate"
    }
  ],
  "meta": {
    "request_id": "req_abc123def456ghij",
    "timestamp": "2026-03-27T07:45:00Z",
    "elapsed_ms": 12
  }
}
```

***

## Aggregates: summary, extremes, stats

With `summary=1`, `extremes=N` or `stats=1` (type=current only), `data` is an object holding the aggregates asked for instead of the rows. They are computed on the server from the same book, so an agent or a client never re-derives them from 13,000 rows. Several can be asked for at once; each covers the request's scope. `summary=1` also answers on type=accumulated (see "type=accumulated" below).

### Response fields

**summary** `array`

Present with `summary=1` (which needs `coin`). One entry per instrument and asset class, grouped as the funding grid groups its rows: a coin's contracts by their `asset_id`, whatever the venue's lot spelling, so `coin=PEPE` answers one `PEPE` entry over the PEPE, 1000PEPE and KPEPE contracts; a stock, index, commodity or FX perp by its underlying ticker, so MEXC's KOSTOCK and BingX's NCSKKO2USD join KO. A ticker two asset classes share (CVX the coin and Chevron) answers one entry per class. Each entry carries `base_coin` (the entry's ticker, the coin's `asset_symbol` when it has one), `asset_class` and the fields below.

**summary\[].funding\_avg\_8h** `number | null`

Average funding across venues on the 8-hour basis, over one primary contract per venue with a fresh rate. A `trailing_8h` rate (Deribit) is realised funding, not a current rate, and counts as stale. Weighted by each contract's one-sided open interest when at least two venues, and a majority of them, carry open interest; otherwise the median. `null` when no venue has a usable rate, never `0`.

**summary\[].funding\_median\_8h** `number | null`

Median of the same venues' 8-hour rates.

**summary\[].funding\_method** `string | null`

`oi_weighted` or `median_fallback`: how `funding_avg_8h` was reduced. `null` with it.

**summary\[].funding\_venues\_used** `integer`

Venues behind the figures, one primary contract each.

**summary\[].funding\_venues\_stale** `integer`

Venues left out because their rate was older than 10 minutes, or was a `trailing_8h` rate (Deribit), while another venue was fresh.

**summary\[].funding\_all\_stale** `boolean`

`true` when no venue was fresh: the figures are then over the stale rates.

**summary\[].open\_interest** `number | null`

One-sided open interest in USD over every contract of the entry in the funding book, inverse and lot contracts included, the venues kept out of open-interest totals (MEXC) left out: the funding grid's OI column. It counts only the funding book's contracts, every asset class, so it is not the market-wide open interest `/v1/global/overview` serves per asset. `null` when no contract reports open interest.

**summary\[].next\_settlement\_at** `string | null`

The entry's next funding settlement on any venue: the soonest published `next_funding_time` still ahead among its fresh contracts, or, for a venue that publishes none, the next multiple of the contract's own interval from 00:00 UTC. `null` when no fresh contract has either.

**summary\[].next\_settlement\_estimated** `boolean | null`

`true` when `next_settlement_at` was stepped from an interval rather than published by the venue. `null` with `next_settlement_at`.

**extremes** `object`

Present with `extremes=N`. `highest` holds up to N rows with `rate_8h` ≥ 0, highest first; `lowest` up to N rows with `rate_8h` \< 0, lowest first (full `type=current` rows, `rate_8h` and `apr` included), among rows that are fresh, have a usable interval and clear `min_oi_usd`. A list is empty when no such row has that sign: `lowest` is empty when no eligible rate is below `0`, never filled with positive rates. `omitted` counts the rows each check left out: `stale`, `no_interval`, `below_floor` (open interest below the floor, or unknown while the floor is above `0`).

**market** `object`

Present with `stats=1`: the whole book's funding over one primary contract per venue and asset with a fresh rate, every asset class included. An asset is a row of the funding grid: PEPE, 1000PEPE and KPEPE are one asset, so a venue listing two of its spellings counts once. `funding_apr_mean` and `funding_apr_oi_weighted` are the mean and the open-interest-weighted 8-hour rate annualized (× 1,095): the computation behind `avg_funding_rate` on `/v1/market/derivatives-overview`, without a key. `funding_apr_oi_weighted` is `null` when no contract carries open interest. `positive` and `negative` count the contracts whose fresh rate is above or below `0`. `venue_count` is the number of venues Sharpe tracks and `live_venues` those with at least one fresh contract in the book.

```json title="Response (type=current&coin=BTC&summary=1&extremes=1)" theme={null}
{
  "data": {
    "summary": [
      {
        "base_coin": "BTC",
        "asset_class": "crypto",
        "funding_avg_8h": 0.0000692,
        "funding_median_8h": 0.0000756,
        "funding_method": "oi_weighted",
        "funding_venues_used": 6,
        "funding_venues_stale": 0,
        "funding_all_stale": false
      }
    ],
    "extremes": {
      "highest": [
        { "exchange": "OKX", "symbol": "BTC-USDT-SWAP", "rate": 0.0001, "interval_hours": 8, "rate_8h": 0.0001, "apr": 0.1095, "...": "every type=current field" }
      ],
      "lowest": [
        { "exchange": "Hyperliquid", "symbol": "BTC", "rate": 0.0000031, "interval_hours": 1, "rate_8h": 0.0000248, "apr": 0.027156, "...": "every type=current field" }
      ],
      "omitted": { "stale": 0, "no_interval": 0, "below_floor": 0 }
    }
  },
  "meta": {
    "request_id": "req_abc123def456ghij",
    "timestamp": "2026-09-28T12:02:00Z",
    "elapsed_ms": 9
  }
}
```

***

## type=accumulated

Returns pre-computed cumulative funding rate sums and settlement counts across multiple time windows. Useful for calculating net funding cost or income without aggregating history yourself.

The response carries `X-Data-As-Of`, `X-Data-Stale`, and `X-Freshness-Sla-Seconds` from the accumulated pipeline itself. Use each `settlements_*` field with the contract's native `interval_hours` before comparing annualized results; each row's `coverage` says, per window, how much of the span the contract was expected to settle in its settlements cover (`complete` from 90%), whether it was listed inside the window, and whether it stopped trading inside it.

### Response fields

**base\_coin** `string`

The base asset ticker.

**exchange** `string`

The venue's display name, in its exact stored casing (e.g. `Binance`, `Gate.io`).

**symbol** `string`

The trading pair symbol.

**acc\_1d** `number`

Accumulated funding rate over the last 1 day.

**acc\_7d** `number`

Accumulated funding rate over the last 7 days.

**acc\_30d** `number`

Accumulated funding rate over the last 30 days.

**acc\_90d** `number`

Accumulated funding rate over the last 90 days.

**acc\_1y** `number`

Accumulated funding rate over the last 1 year.

**settlements\_1d** `integer`

Number of funding settlements in the last 1 day.

**settlements\_7d** `integer`

Number of funding settlements in the last 7 days.

**settlements\_30d** `integer`

Number of funding settlements in the last 30 days.

**settlements\_90d** `integer`

Number of funding settlements in the last 90 days.

**settlements\_1y** `integer`

Number of funding settlements in the last 1 year.

**interval\_hours** `number | null`

The contract's own settlement interval, joined in from the live contract book. `null` when no live contract matches `(exchange, symbol)`. Expected settlements for a window are `ceil(window_hours / interval_hours)`. Compare `settlements_*` against that, never against a fixed 8-hour assumption.

**asset\_class** `string | null`

Underlying category, joined in from the live contract book. `null` when no live contract matches, rather than being defaulted to `crypto`.

**margin\_type** `string | null`

Collateral convention, joined in from the live contract book. `null` when no live contract matches.

**is\_active** `boolean`

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

**coverage** `object`

Per window (`1d`, `7d`, `30d`, `90d`, `1y`): `coverage_ratio` (number | null), `complete` (boolean | null), `listed_within_window`, `halted_within_window` (booleans). The span runs from the contract's first settlement to its halt — the time the instrument master recorded it leaving trading, else its last settlement plus one interval once its row stopped updating — or to now, and counts no more than the window's `covered_hours_*`, so a hole inside the span reads as missing. `null` ratio: the contract was not expected in that window at all. With `halted_within_window` or `listed_within_window` true, a complete window's `acc_*` sums fewer hours than the window (see `covered_hours_*`): compare `acc_*` across contracts only on complete windows where both are false.

**covered\_hours\_1d … covered\_hours\_1y** `number | null`

Served beside `coverage`, one per window: the hours of funding the settlements summed in `acc_*` stand for (the sum of their `interval_hours`). Fewer hours than the window, or than the contract's span inside it, means missing settlements, including in the middle of the window. Can exceed the window by up to one interval. `null` when unknown.

**summary** `array`

With `summary=1` (which needs `coin`), `data` is `{ "summary": [...] }` instead of the rows: one entry per instrument and asset class, grouped as on type=current, with `base_coin`, `asset_class` and, per window (`1d` … `1y`), `acc_median_*` (the median `acc_*` over the venues whose history covers at least 90 % of the window, one contract per venue), `acc_apr_median_*` (the median of the same venues' `acc_apr_*`, not the median sum scaled) and `carry_spread_apr_*` (the highest `acc_apr_*` minus the lowest among the coin's trading contracts that cover the window and hold at least \$1M of open interest, never negative; `null` with fewer than two venues). Each is `null`, never `0`, when nothing qualifies.

**acc\_apr\_1d … acc\_apr\_1y** `number | null`

One per window: `acc_*` annualised over the days of history behind it, `acc / observed days × 365`, as a fraction (`0.1095` is 10.95 % a year). The observed days run from the contract's first settlement in the window to its last plus one interval, capped by `covered_hours_*` and by the window, so a contract listed two days ago is annualised over two days. `null`, never `0`, when the window holds no settlement or no observed day.

**asset\_id** `string | null`

The contract's asset in Sharpe's instrument master, as on `type=current` rows. `null` when no live contract matches or the master does not know it.

**asset\_symbol** `string | null`

The asset's ticker, as on `type=current` rows.

**lot\_multiplier** `number | null`

Units of the asset per unit the contract quotes, as on `type=current` rows. Accumulated sums are fractions of notional and need no scaling.

**instrument\_status** `string | null`

The venue's own status for the contract, as on `type=current` rows.

**is\_live** `boolean | null`

Whether the contract is trading now, as on `type=current` rows; `null` is unknown.

`GET /v1/funding/rates?type=accumulated`

```bash cURL theme={null}
curl -G https://www.sharpe.ai/api/v1/funding/rates \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -d type=accumulated
```

```ts TypeScript theme={null}
const res = await fetch(
  'https://www.sharpe.ai/api/v1/funding/rates?type=accumulated',
  {
    headers: {
      Authorization: 'Bearer sk_live_your_key_here',
    },
  },
)
const { data } = await res.json()
```

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

resp = requests.get(
    "https://www.sharpe.ai/api/v1/funding/rates",
    headers={"Authorization": "Bearer sk_live_your_key_here"},
    params={"type": "accumulated"},
)
data = resp.json()["data"]
```

```json title="Response (type=accumulated)" theme={null}
{
  "data": [
    {
      "base_coin": "BTC",
      "exchange": "Binance",
      "symbol": "BTCUSDT",
      "acc_1d": 0.000312,
      "acc_7d": 0.002184,
      "acc_30d": 0.009360,
      "acc_90d": 0.028080,
      "acc_1y": 0.112320,
      "settlements_1d": 6,
      "settlements_7d": 42,
      "settlements_30d": 180,
      "settlements_90d": 540,
      "settlements_1y": 2190,
      "interval_hours": 4,
      "asset_class": "crypto",
      "margin_type": "linear",
      "is_active": true,
      "asset_id": "bitcoin",
      "asset_symbol": "BTC",
      "lot_multiplier": 1,
      "instrument_status": "trading",
      "is_live": true
    }
  ],
  "meta": {
    "request_id": "req_def456ghi789jklm",
    "timestamp": "2026-03-27T07:45:00Z",
    "elapsed_ms": 12
  }
}
```

***

## type=history

Returns a time series of individual funding rate payments for a specific coin. Use this for charting, backtesting, or building your own accumulation logic. Results are ordered by `settled_at` ascending.

A window is served whether or not the coin has that much history: asking for `days=1095` on a contract listed 17 months ago is still a 200. Three response headers state what the body actually covers, derived from the returned rows: `X-Requested-Start` (the window asked for), `X-Coverage-Start` (oldest settlement returned, absent when the window returned nothing) and `X-Coverage-Complete` (`false` when coverage starts more than seven days after the requested start, or when no rows came back). `X-Data-As-Of` and `meta.as_of` are when the funding job last completed a run, which is when the history was last extended, not the newest settlement returned. `X-Days-Clamped` is always `false` here because `/v1` rejects a `days` above 1095 with a 400 instead of shortening the window.

> [!NOTE]
>
> The `coin` parameter is **required** when `type=history`. Omitting it returns a `missing_parameter` error.

### Response fields

**exchange** `string`

The venue's display name, in its exact stored casing (e.g. `Binance`, `Gate.io`).

**symbol** `string`

The contract that settled. One coin spans several contracts per venue at times (a USDT and a USDC perp, or `PEPE` next to `1000PEPE` lots), so series are per `(exchange, symbol)`. History rows carry no other contract metadata; join `type=current` rows on `(exchange, symbol)` for `asset_id`, `lot_multiplier` and status.

**rate** `number`

The funding rate at settlement time, as a fraction charged once over `interval_hours`.

**interval\_hours** `number`

Hours the settlement covered for this contract. It can change over the series when a venue re-tiers a symbol, so accumulate per row rather than multiplying by a single interval.

**settled\_at** `string`

ISO 8601 timestamp when the funding payment was settled.

`GET /v1/funding/rates?type=history&coin=BTC`

```bash cURL theme={null}
curl -G https://www.sharpe.ai/api/v1/funding/rates \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -d type=history \
  -d coin=BTC \
  -d days=7
```

```ts TypeScript theme={null}
const params = new URLSearchParams({
  type: 'history',
  coin: 'BTC',
  days: '7',
})
const res = await fetch(
  `https://www.sharpe.ai/api/v1/funding/rates?${params}`,
  {
    headers: {
      Authorization: 'Bearer sk_live_your_key_here',
    },
  },
)
const { data } = await res.json()
```

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

resp = requests.get(
    "https://www.sharpe.ai/api/v1/funding/rates",
    headers={"Authorization": "Bearer sk_live_your_key_here"},
    params={
        "type": "history",
        "coin": "BTC",
        "days": 7,
    },
)
data = resp.json()["data"]
```

```json title="Response (type=history)" theme={null}
{
  "data": [
    {
      "exchange": "Binance",
      "rate": 0.000095,
      "interval_hours": 4,
      "settled_at": "2026-03-20T00:00:00Z"
    },
    {
      "exchange": "Binance",
      "rate": 0.000110,
      "interval_hours": 4,
      "settled_at": "2026-03-20T04:00:00Z"
    },
    {
      "exchange": "Hyperliquid",
      "rate": 0.0000125,
      "interval_hours": 1,
      "settled_at": "2026-03-20T00:00:00Z"
    },
    {
      "exchange": "Gate.io",
      "rate": 0.000120,
      "interval_hours": 8,
      "settled_at": "2026-03-20T08:00:00Z"
    }
  ],
  "meta": {
    "request_id": "req_ghi789jkl012mnop",
    "timestamp": "2026-03-27T07:45:00Z",
    "elapsed_ms": 12
  }
}
```

***

## Get funding fee settlement

`GET /v1/funding/settlement`

Returns how many dollars actually changed hands at funding settlement, and which side paid it: `fee_usd = open_interest_usd × rate`, priced at the one-sided open interest (each contract counted once: the side that pays) recorded at or before each settlement. `window=current` is the **next 24 hours** of funding at current rates (forward-looking), priced live and labelled `estimated`; `1d`/`3d`/`7d` are realised windows. Every window reports `long_paid` and `short_paid` alongside `net` — a `$0` net can conceal \$50M flowing each way, so no consumer is given `net` alone.

> [!NOTE]
>
> The response carries a `totals` block scoped to the selected `class`, in the same shape as a row. The five classes (`crypto`, `equity`, `commodity`, `fx`, `index`), and `crypto` + `rwa`, each reconcile exactly to `all`, in every window, for `net`, `long_paid` and `short_paid`.

### Query parameters

**window** `string`

Settlement window. One of `current`, `1d`, `3d`, `7d`. Defaults to `current`.

**class** `string`

Asset-class scope, the same categories as the funding board. One of `all`, `crypto`, `equity`, `commodity`, `fx`, `index`, or `rwa` (every non-crypto class at once: equity, commodity, fx, index). Defaults to `all`.

**coin** `string`

Comma-separated base coin tickers, e.g. `BTC,ETH`. Unfiltered by default.

**exchange** `string`

Narrows to coins settling on one venue. Accepts the slug, the display name as returned in `venues[].exchange`, or the ccxt id. An unrecognized value returns a 400 error. Implies the per-venue breakdown internally; the response still omits `venues` unless `expand=venues` is also set.

**limit** `integer`

Maximum number of rows returned. `1` to `1000`. Defaults to `100`.

**offset** `integer`

Zero-based row offset for pagination. Defaults to `0`.

**sort** `string`

Sort field for the selected window, optionally prefixed with a hyphen for descending order. One of `base_coin`, `net`, `long_paid`, `short_paid`, `open_interest_usd`, `-base_coin`, `-net`, `-long_paid`, `-short_paid`, `-open_interest_usd`. Rows with no value for the sort field always sort last, regardless of direction.

**expand** `string`

Set to `venues` to include each row's per-venue breakdown. Omitted by default to keep the default payload small.

### Response fields

**base\_coin** `string`

The base asset ticker.

**asset\_class** `string`

Underlying category: `crypto`, `equity`, `commodity`, `fx` or `index`.

**open\_interest\_usd** `number | null`

One-sided USD open interest summed across whichever of this coin's venues currently have a priced reading, less any venue left out of totals (see "Venue coverage" below). `null` only when none do -- never `0` as a stand-in for missing.

**windows** `object`

Keyed by `current`, `1d`, `3d`, `7d`. Every window carries `net`, `long_paid` and `short_paid` (see "Sign convention"). `current` additionally carries `estimated: true` and `rate_source` (`predicted`, `current`, or `mixed` when a row's contracts used both; see "What `current` means"). The three realised windows additionally carry `coverage_ratio`, `partial`, `complete`, `listed_within_window` and `halted_within_window` once the window has any priced history at all (see "Partial windows").

**venues** `array`

Present only when `expand=venues` is set. Each entry is `{ exchange, open_interest_usd, windows }` -- the same per-window shape as the row itself, scoped to that one venue -- plus `excluded_from_totals` (the reason) on a venue whose dollars the row and the totals leave out.

### Sign convention

A positive `rate` means longs pay shorts, so a positive `net` is a cost to longs, and a negative `net` means longs were net paid. `long_paid` and `short_paid` are both always non-negative; `net = long_paid − short_paid` recovers the sign. Both legs are always returned alongside `net` -- a `net` of `0` can conceal \$50M changing hands in each direction, so no consumer is given the net alone.

### What `current` means

`window=current` has not happened yet -- it is the **next 24 hours** of funding if current rates hold, priced live: `fee_usd = open_interest_usd × forward_rate × 24 / interval_hours` per contract (so a 1-hour contract counts 24 settlements and an 8-hour contract 3), using the freshest OI reading and the forward-looking rate (the venue's `predicted_rate` when it publishes one, otherwise its `rate` -- see `rate_source`). On Bitfinex and Deribit that `rate` is the last settled and the trailing 8-hour realised rate respectively (`rate_kind` on `type=current`), projected forward. It always carries `estimated: true`. `1d`, `3d` and `7d` are realised: every settlement that actually occurred inside that window, summed.

### Partial windows

Open interest only accrues forward from when Sharpe first started tracking a venue's OI -- no exchange backfills OI history. A venue tracked for the last two days has a complete `1d` window but an incomplete `7d` one until a full week of history exists. `coverage_ratio` is the fraction of the window actually covered by priced history (`1` = complete) -- a coin, venue or total row weights its contracts by open interest, and a contract that stopped settling (halted or delisted) is only expected until its last priced settlement plus one interval; `partial` is `true` when that ratio is below `0.9`. A partial window's `net`, `long_paid` and `short_paid` are still real sums of whatever settled in that shorter span -- building history, not a completed total -- so treat `partial: true` as a caveat on the figure, not a reason to hide it. `complete` is the opposite of `partial`. `halted_within_window` is `true` when a contract priced in the window stopped settling inside it (its funding row left the live book or went stale), which is why its coverage ends at its last settlement plus one interval. `listed_within_window` is always `null` here: the settlement data carries no listing time, so a listing is unknown rather than assumed.

### Freshness and caching

`settlementMeta.updated_at` and `meta.as_of` are when the settlement windows were last refreshed (every 15 minutes; stale after 30 minutes), not the request time. Responses are cached for up to 5 minutes while fresh and 30 seconds once the settlement data is older than 30 minutes; an incomplete answer (open interest or ranks unreadable) is not cached. A failed read returns `503` (`service_unavailable`, `Retry-After: 30`).

### Venue coverage

Of the 35 venues in Sharpe's funding book, 24 run an open-interest fetcher capable of pricing a dollar figure here (Nado, LBank, Bitunix, edgeX, Phemex, Lighter Robinhood, Arcus, Ondo Perps, Antarctic, Polymarket Perps and Kalshi have none, so their contracts carry null open interest), and every one stores open interest the same way: one-sided USD notional, each contract counted once -- the side that pays, which is what makes `fee_usd = open_interest_usd × rate` exact. Venues that publish both sides (Bybit, Gate.io, Bitget, Pacifica, Backpack, ApeX, Extended) are read through their own one-sided field or halved. `tradeXYZ`, `Lighter`, `Variational` and `Aster`, withheld until 2026-09-27 for reading at half the figure other sources show, contribute again: their figures were one side all along, and those sources publish both. `MEXC` is the exception: its open interest moves 7.00x the position change its own trade feed reports, so its dollars appear only in the per-venue breakdown (`venues[].excluded_from_totals`) and are left out of every row's `net`, `long_paid`, `short_paid` and `open_interest_usd` and of `totals`; `settlementMeta.oi_excluded_venues` names it with the reason. Its funding rates are unaffected and still appear on `/v1/funding/rates`.

```bash cURL theme={null}
curl -G https://www.sharpe.ai/api/v1/funding/settlement \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -d window=7d \
  -d class=crypto
```

```ts TypeScript theme={null}
const params = new URLSearchParams({
  window: '7d',
  class: 'crypto',
})
const res = await fetch(
  `https://www.sharpe.ai/api/v1/funding/settlement?${params}`,
  {
    headers: {
      Authorization: 'Bearer sk_live_your_key_here',
    },
  },
)
const { data } = await res.json()
```

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

resp = requests.get(
    "https://www.sharpe.ai/api/v1/funding/settlement",
    headers={"Authorization": "Bearer sk_live_your_key_here"},
    params={"window": "7d", "class": "crypto"},
)
data = resp.json()["data"]
```

```json Response theme={null}
{
  "data": {
    "rows": [
      {
        "base_coin": "ETH",
        "asset_class": "crypto",
        "open_interest_usd": 9080000000,
        "windows": {
          "current": {
            "net": 234930,
            "long_paid": 998150,
            "short_paid": 820350,
            "estimated": true,
            "rate_source": "current"
          },
          "1d": {
            "net": 809050,
            "long_paid": 1200000,
            "short_paid": 390950,
            "coverage_ratio": 1,
            "partial": false,
            "complete": true,
            "listed_within_window": null,
            "halted_within_window": false
          },
          "3d": { "net": null, "long_paid": null, "short_paid": null },
          "7d": {
            "net": 5460000,
            "long_paid": 8210000,
            "short_paid": 2750000,
            "coverage_ratio": 1,
            "partial": false,
            "complete": true,
            "listed_within_window": null,
            "halted_within_window": true
          }
        }
      }
    ],
    "totals": {
      "current": { "net": 177800, "long_paid": 998150, "short_paid": 820350, "estimated": true },
      "1d": { "net": 3790000, "long_paid": 6930000, "short_paid": 3130000, "coverage_ratio": 1, "partial": false },
      "3d": { "net": null, "long_paid": null, "short_paid": null },
      "7d": { "net": 24680000, "long_paid": 53570000, "short_paid": 28880000, "coverage_ratio": 1, "partial": false }
    },
    "settlementMeta": {
      "class": "crypto",
      "coins": 940,
      "updated_at": "2026-08-06T10:00:00Z",
      "total": 940,
      "limit": 100,
      "offset": 0
    },
    "pagination": { "cursor": null, "has_more": true, "total": 940 }
  },
  "meta": {
    "request_id": "req_stu345vwx678yzab",
    "timestamp": "2026-08-06T10:00:00Z",
    "elapsed_ms": 41
  }
}
```

***

## List available coins

`GET /v1/funding/coins`

Returns every distinct base coin in the current funding-rate book with a display name and a same-origin logo path, ordered by symbol. Use this to populate coin selectors without downloading the full funding book.

### Response fields

**coins** `array`

Array of coin objects, ordered by symbol.

**coins\[].symbol** `string`

Asset ticker as quoted in the funding book (e.g., `BTC`, `1000PEPE`).

**coins\[].name** `string | null`

Display name from coin metadata; `null` when no metadata exists.

**coins\[].logo\_url** `string | null`

Same-origin logo path; `null` when no logo exists.

```bash cURL theme={null}
curl -G https://www.sharpe.ai/api/v1/funding/coins \
  -H "Authorization: Bearer sk_live_your_key_here"
```

```ts TypeScript theme={null}
const res = await fetch(
  'https://www.sharpe.ai/api/v1/funding/coins',
  {
    headers: {
      Authorization: 'Bearer sk_live_your_key_here',
    },
  },
)
const { data } = await res.json()
```

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

resp = requests.get(
    "https://www.sharpe.ai/api/v1/funding/coins",
    headers={"Authorization": "Bearer sk_live_your_key_here"},
)
data = resp.json()["data"]
```

```json Response theme={null}
{
  "data": {
    "coins": [
      {
        "symbol": "BTC",
        "name": "Bitcoin",
        "logo_url": "/api/coin-logo-image?symbol=BTC"
      },
      {
        "symbol": "ETH",
        "name": "Ethereum",
        "logo_url": "/api/coin-logo-image?symbol=ETH"
      }
    ]
  },
  "meta": {
    "request_id": "req_abc123def456ghi7",
    "timestamp": "2026-08-13T10:00:00Z",
    "elapsed_ms": 18
  }
}
```

[Read the error reference](https://docs.sharpe.ai/errors.md)


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