# Agent402 Perpetual DEX Markets

> Agent402 Perpetual DEX Markets is a paid API for AI agents from agent402.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-11).

Returns a ranked list of perpetual futures markets on a specified decentralized exchange, sorted by volume, open interest, funding rate, or other criteria.

## Facts

- Endpoint: POST https://agent402.tools/api/perp-dex-markets?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-perpetual-dex-markets-7cfd93eb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aygtr-Ap5zKK8O7mMbCW_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-perpetual-dex-markets-7cfd93eb -d '<json body>'
```

Example prompt: Show me the top 20 perpetual futures markets on the xyz DEX sorted by open interest, including funding rates and 24h volume.

## When to prefer this

Use this endpoint when you need structured, ranked perpetual futures market data from a specific HIP-3 compatible decentralized exchange, especially when you want to filter by volume, open interest, funding rate, or price change. Prefer this over centralized exchange APIs when you specifically need on-chain or DEX-native perp data including funding rates, leverage limits, and growth mode flags.

## Known failure modes

- Invalid or unknown DEX name returns an error or empty markets array
- Invalid sort field value may default to volume or return a validation error
- Limit exceeding 500 is clamped or rejected
- DEX temporarily unavailable may return stale or empty data
- Network or upstream Hyperliquid API outage causes fetch failure

## How this service works

Snapshot of every market on ONE builder-deployed perp dex (HIP-3): mark and oracle price, 24h change, hourly funding (plus 8h and annualized), open interest in units and USD, 24h notional volume, impact premium, max leverage, growth mode, isolated-only and margin mode, deployer fee scale, and the dex's collateral token. Coins carry the dex prefix (xyz:TSLA). Sort by volume, openInterest, funding, change or coin; limit caps the list (max 500). Keyless public data.

## Output

Returns a JSON object containing an array of perpetual market entries for the specified DEX, each including coin symbol, mark price, oracle price, 8-hour funding rate, funding APR, hourly funding rate, 24h volume in USD, open interest in USD, 24h price change percentage, premium percentage, max leverage, margin mode, size decimals, and growth mode status. Also includes metadata such as total market count, delisted market count, collateral token, data source, and fetch timestamp.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "dex": {
   "type": "string",
   "description": "HIP-3 dex name, e.g. xyz (list them with perp-dexs)."
  },
  "sort": {
   "type": "string",
   "description": "volume (default), openInterest, funding, change, or coin."
  },
  "limit": {
   "type": "number",
   "description": "Rows to return (default 50, max 500)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "dex": "xyz",
  "sort": "volume",
  "count": 1,
  "source": "hyperliquid",
  "markets": [
   {
    "dex": "xyz",
    "coin": "xyz:TSLA",
    "markPx": 431.2,
    "oraclePx": 431.1,
    "funding8h": 0.00005,
    "growthMode": "enabled",
    "marginMode": null,
    "premiumPct": -0.0051,
    "szDecimals": 3,
    "maxLeverage": 20,
    "change24hPct": 1.2,
    "onlyIsolated": false,
    "openInterest": 8837.2,
    "volume24hUsd": 158407743.45,
    "fundingAprPct": 5.475,
    "fundingHourly": 0.00000625,
    "openInterestUsd": 3810601,
    "deployerFeeScale": 1
   }
  ],
  "fetchedAt": "2026-09-18T12:00:00.000Z",
  "totalMarkets": 108,
  "collateralToken": 0,
  "delistedMarkets": 15
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-perpetual-dex-markets-7cfd93eb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
