> For the complete documentation index, see [llms.txt](https://docs.dexpal.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dexpal.io/for-partners/endpoints/dex-markets.md).

# DEX Markets

Returns real-time market data for all trading pairs available on the DEX.

## Overview

|                    |                  |
| ------------------ | ---------------- |
| **Method**         | GET              |
| **Poll frequency** | Every 30 seconds |
| **Auth**           | Bearer API key   |
| **Rate limit**     | 60 req/min       |

## Request

No query parameters.

### Headers

| Header          | Required | Description        |
| --------------- | -------- | ------------------ |
| `Authorization` | yes      | `Bearer <api_key>` |

## Response

Returns a top-level `data` array where each item represents one market. A `timestamp` reflects the time the data was generated.

### Fields — Market Object

| Field                     | Type                                                                                                                    | Required | Description                                                                                                    |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------------------- |
| `baseAssets`              | array\[[AssetObject](/for-partners/schemas/asset-object.md)]                                                            | yes      | Base assets for this market. Single-item array for standard pairs.                                             |
| `quoteAssets`             | array\[[AssetObject](/for-partners/schemas/asset-object.md)]                                                            | yes      | Quote assets for this market.                                                                                  |
| `tradeUrl`                | string                                                                                                                  | yes      | Direct URL to trade this market on the DEX.                                                                    |
| `price`                   | number                                                                                                                  | yes      | Current mark/last price in quote currency.                                                                     |
| `volume24h`               | number                                                                                                                  | yes      | 24-hour trading volume in USD (pre-calculated).                                                                |
| `openInterest`            | number                                                                                                                  | yes      | Current open interest in USD (pre-calculated).                                                                 |
| `fundingRate`             | number                                                                                                                  | yes      | Current funding rate as a decimal percentage. `0.0125` = 0.0125%.                                              |
| `indexPrice`              | number                                                                                                                  | no       | Oracle/index price in quote currency.                                                                          |
| `change24h`               | number                                                                                                                  | no       | 24-hour price change as a decimal percentage.                                                                  |
| `high24h`                 | number                                                                                                                  | no       | 24-hour high price in quote currency.                                                                          |
| `low24h`                  | number                                                                                                                  | no       | 24-hour low price in quote currency.                                                                           |
| `maxLeverage`             | integer                                                                                                                 | no       | Maximum leverage available for this market.                                                                    |
| `fundingInterval`         | integer                                                                                                                 | no       | Funding interval in hours. Defaults to `8` if omitted.                                                         |
| `nextFunding`             | ISO8601                                                                                                                 | no       | Timestamp of the next funding payment.                                                                         |
| `minOrderSize`            | number                                                                                                                  | no       | Minimum order size in base currency.                                                                           |
| `makerFee`                | number                                                                                                                  | no       | Base maker/open fee as a decimal percentage. `0.02` = 0.02%.                                                   |
| `takerFee`                | number                                                                                                                  | no       | Base taker/close fee as a decimal percentage. `0.05` = 0.05%.                                                  |
| `status`                  | string                                                                                                                  | no       | Market lifecycle state. `active`, `paused`, `delisted`, `settling`, `prelaunch`.                               |
| `fundingIntervalType`     | string                                                                                                                  | no       | How the funding interval is determined. `fixed`, `dynamic`, `continuous`, or `velocity`.                       |
| `fundingRateConvention`   | string                                                                                                                  | no       | Sign convention for funding rate. `standard` (positive = longs pay shorts), `inverted`, or `apy` (annualised). |
| `feeModel`                | string                                                                                                                  | no       | How trading fees are charged for this market. `fee`, `spread`, `mixed`, `winFee`, or `zeroFee`.                |
| `contractType`            | string                                                                                                                  | no       | Settlement type. `linear` (USDC-settled), `inverse` (base-settled), or `quanto`.                               |
| `settlementAsset`         | string                                                                                                                  | no       | Asset used to settle PnL. e.g. `"BTC"` for inverse, `"USDC"` for linear.                                       |
| `openInterestCap`         | number                                                                                                                  | no       | Maximum total open interest allowed for this market in USD.                                                    |
| `openInterestUtilization` | number                                                                                                                  | no       | Current OI as a fraction of the cap (0–1).                                                                     |
| `marketRestriction`       | string                                                                                                                  | no       | Current operational trading restriction. `none`, `reduceOnly`, `postOnly`, or `halted`.                        |
| `borrowRate`              | number                                                                                                                  | no       | Hourly borrow rate as a decimal. Distinct from `fundingRate`.                                                  |
| `leverageTiers`           | array\[[LeverageTier](https://github.com/dexpal-analytics/dexpal/blob/main/docs/dex-api-spec/schemas/leverage-tier.md)] | no       | Leverage tier schedule by notional size.                                                                       |
| `maxPositionSizeUsd`      | number                                                                                                                  | no       | Maximum position size in USD for this market.                                                                  |
| `maxOrderSize`            | number                                                                                                                  | no       | Maximum single order size in base tokens.                                                                      |
| `makerFeeRebate`          | boolean                                                                                                                 | no       | `true` if maker fee is negative (DEX pays the maker).                                                          |
| `adlActive`               | boolean                                                                                                                 | no       | `true` if the auto-deleveraging system is currently active for this market.                                    |
| `feeDiscountProgram`      | boolean                                                                                                                 | no       | `true` if a volume-based fee discount program applies to this market.                                          |
| `maxPnlCap`               | number                                                                                                                  | no       | Maximum profit multiplier cap. e.g. `9.0` = 900% max profit.                                                   |
| `tradingHours`            | [TradingHours](https://github.com/dexpal-analytics/dexpal/blob/main/docs/dex-api-spec/schemas/trading-hours.md)         | no       | Trading hours schedule. `null` for 24/7 markets.                                                               |

## Example Response

```json
{
  "success": true,
  "data": [
    {
      "baseAssets": [{ "symbol": "BTC", "assetType": "crypto" }],
      "quoteAssets": [{ "symbol": "USD" }],
      "tradeUrl": "https://app.example.com/trade/BTC-USD",
      "price": 67543.21,
      "volume24h": 1234567890.5,
      "openInterest": 98765432.1,
      "fundingRate": 0.0125,
      "indexPrice": 67540.0,
      "change24h": 2.34,
      "high24h": 68000.0,
      "low24h": 66500.0,
      "maxLeverage": 100,
      "fundingInterval": 8,
      "nextFunding": "2026-01-20T22:00:00Z",
      "minOrderSize": 0.001,
      "makerFee": 0.02,
      "takerFee": 0.05
    },
    {
      "baseAssets": [{ "symbol": "ETH", "assetType": "crypto" }],
      "quoteAssets": [{ "symbol": "USD" }],
      "tradeUrl": "https://app.example.com/trade/ETH-USD",
      "price": 3456.78,
      "volume24h": 567890123.45,
      "openInterest": 45678901.23,
      "fundingRate": 0.008
    }
  ],
  "timestamp": "2026-01-20T21:00:00Z"
}
```

## Error Responses

| Status | Error                          | When                      |
| ------ | ------------------------------ | ------------------------- |
| `401`  | `"Invalid or missing API key"` | Bad or absent auth header |
| `500`  | `"Internal server error"`      | Unexpected failure        |

## Notes

* Return **all** active markets in a single response. Do not paginate this endpoint.
* Markets with zero volume or open interest should still be included if they are tradeable.
* `fundingRate` should reflect the current rate at the time of the response, not a historical average.
* For DEXes that charge different fees per user tier, return the base/default rate.
* For markets with variable leverage per user, return the platform maximum.
