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

# Perpetual Markets

> Price, volume and open interest for a perpetual futures contract on a centralized exchange: open, high, low, close, volume and end-of-day and average open interest. Each series is one contract, keyed by exchange and contract symbol. Dated futures are not included.

One row per perpetual futures contract on a centralized exchange, keyed by exchange and contract symbol: exchange, symbol, base asset, quote and settle currency, contract type and margin type. The id is the series key of the perpetual-markets timeseries model; filter by base asset to find every venue listing an asset's perpetual.

|                  |                                                                                                                                                                   |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Access           | Market\_data\_unified                                                                                                                                             |
| Tabular model    | `perpetual-markets`: primary key `id`, identifiers `slug`, aliases `futures-markets`, `futures-market-entities`                                                   |
| Timeseries model | `perpetual-markets`: intervals `1d`, series key `id` (Perpetual Market ID), series must be named (up to 20 per call), aliases `futures-markets`, `futures-market` |

## Endpoints

<CardGroup cols={2}>
  <Card title="List Perpetual Markets" icon="arrow-right" href="/api-reference/data-api/derivatives/tabular-perpetual-markets">
    One page of rows with per-column filters, sorting and pagination.
  </Card>

  <Card title="Get Perpetual Market" icon="arrow-right" href="/api-reference/data-api/derivatives/tabular-perpetual-markets-by-id">
    One row by `id` or by `slug`.
  </Card>

  <Card title="Batch Get Perpetual Market timeseries" icon="arrow-right" href="/api-reference/data-api/derivatives/timeseries-perpetual-markets">
    Up to 20 series in one request, named by Perpetual Market ID in `series`.
  </Card>

  <Card title="Get Perpetual Market timeseries" icon="arrow-right" href="/api-reference/data-api/derivatives/timeseries-perpetual-markets-by-id">
    One series over a time window, keyed by its Perpetual Market ID.
  </Card>
</CardGroup>

## Metrics

8 metrics. Use the `Field` value in `selections`; every point starts with the timestamp and continues in this order.

| Field                | Name                        | Type    | Unit | Description                                                                                                                                                 |
| -------------------- | --------------------------- | ------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `openPrice`          | Open Price                  | float64 | usd  | USD price at the candle open.                                                                                                                               |
| `highPrice`          | High Price                  | float64 | usd  | High USD price during the candle.                                                                                                                           |
| `lowPrice`           | Low Price                   | float64 | usd  | Low USD price during the candle.                                                                                                                            |
| `closePrice`         | Close Price                 | float64 | usd  | USD price at the candle close.                                                                                                                              |
| `closePricePerUnit`  | Close Price Per Unit        | float64 | usd  | USD price at the candle close per unit of the base asset, with the contract multiplier divided out. Use this to compare contracts whose multipliers differ. |
| `volumeUSD`          | Volume (USD)                | float64 | usd  | Volume traded during the candle in USD.                                                                                                                     |
| `openInterestUSD`    | Open Interest (USD)         | float64 | usd  | Open interest in USD at the candle close. Null where the exchange reports no open interest, which is distinct from a genuine zero.                          |
| `openInterestUSDAvg` | Open Interest Average (USD) | float64 | usd  | Mean open interest in USD across the observations taken during the candle.                                                                                  |

## Columns

Use the `Field` value in `selections`, `sortBy`, and as the base of a filter parameter (`Field` plus one of its `Filters` suffixes).

| Field                 | Type   | Filters                     | Sort    | Description                                                                                                                                                                    |
| --------------------- | ------ | --------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id`                  | string | `Eq`, `IsOneOf`             |         | The series key of the perpetual-markets timeseries model, the exchange and contract symbol joined with an underscore (binance\_BTCUSDT). (primary key)                         |
| `name`                | string | `Eq`, `IsOneOf`, `Contains` | default | The display name of the market, the exchange name followed by the contract symbol.                                                                                             |
| `slug`                | string | `Eq`, `IsOneOf`             | yes     | The exchange's slug, shared by every market on that exchange (gate-io, crypto-com). (identifier 1)                                                                             |
| `exchange`            | string | `Eq`, `IsOneOf`             | yes     | The exchange's short name as used in the id (binance, bybit, okx).                                                                                                             |
| `symbol`              | string | `Eq`, `IsOneOf`, `Contains` | yes     | The exchange-native contract symbol.                                                                                                                                           |
| `symbolNormalized`    | string | `Eq`, `IsOneOf`, `Contains` |         | The normalized contract symbol, where the exchange provides one.                                                                                                               |
| `baseAssetID`         | string | `Eq`, `IsOneOf`             |         | The unique identifier of the asset the contract tracks. Null, along with the other base asset columns, where the contract's ticker matches no asset.                           |
| `baseAssetName`       | string | `Eq`, `IsOneOf`, `Contains` | yes     | The name of the asset the contract tracks.                                                                                                                                     |
| `baseAssetSlug`       | string | `Eq`, `IsOneOf`             | yes     | The URL slug of the asset the contract tracks.                                                                                                                                 |
| `baseAssetSymbol`     | string | `Eq`, `IsOneOf`, `Contains` | yes     | The ticker symbol of the asset the contract tracks.                                                                                                                            |
| `baseAssetSerialID`   | int64  | `Eq`, `IsOneOf`             |         | The numeric serial identifier of the base asset, used by market data services. Join on it to reach the spot markets for the same asset.                                        |
| `quoteAssetSerialID`  | int64  | `Eq`, `IsOneOf`             |         | The numeric serial identifier of the quote currency, used by market data services.                                                                                             |
| `settleAssetSerialID` | int64  | `Eq`, `IsOneOf`             |         | The numeric serial identifier of the settlement currency, used by market data services. It is what distinguishes an exchange's linear and inverse perpetuals on the same pair. |
| `exchangeSerialID`    | int64  | `Eq`, `IsOneOf`             |         | The numeric serial identifier of the exchange, used by market data services.                                                                                                   |
| `quoteCurrency`       | string | `Eq`, `IsOneOf`             | yes     | The currency the contract is quoted in.                                                                                                                                        |
| `settleCurrency`      | string | `Eq`, `IsOneOf`             |         | The currency the contract settles in.                                                                                                                                          |
| `contractType`        | string | `Eq`, `IsOneOf`             |         | The contract type as reported by the exchange (perpetual or tradfi\_perpetual).                                                                                                |
| `marginType`          | string | `Eq`, `IsOneOf`             |         | The margin type of the contract, linear or inverse.                                                                                                                            |
| `exchangeID`          | string | `Eq`, `IsOneOf`             |         | The unique identifier of the exchange.                                                                                                                                         |
| `exchangeName`        | string | `Eq`, `IsOneOf`, `Contains` |         | The display name of the exchange.                                                                                                                                              |

## Example

```bash curl theme={null}
curl "https://api.blockworks.com/query/timeseries/perpetual-markets/1d/backpack_0G_USDC_PERP?timeframe=7d&selections=openPrice,highPrice" \
  -H "X-Blockworks-API-Key: $BLOCKWORKS_API_KEY"
```

See [Get Perpetual Market timeseries](/api-reference/data-api/derivatives/timeseries-perpetual-markets-by-id) for the response and the errors.
