# Phemex Market Data API
> Real-time perpetual-futures market data from the Phemex crypto exchange. List every live perpetual product with its base, quote and settle currency, tick size and maximum leverage; pull 24-hour tickers for all 800+ symbols at once or one at a time (last, mark and index price, 24h open/high/low, percentage change, traded volume, turnover, open interest and the current and predicted funding rate); read full order-book depth with best bid, best ask and computed spread; and stream the most recent trades with price, size, side and nanosecond timestamp. All prices and quantities are returned already de-scaled into real human-readable units, so there is no exponent arithmetic to do on your side. A short protective cache keeps responses fast while staying within a few seconds of the exchange. Distinct from our BitMEX, BloFin and Bitunix exchange feeds: this surfaces the Phemex order book, ticker tape and product registry specifically.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/phemex-api/..."
```

## Pricing
- **Free** (Free) — 1,690 calls/Mo, 2 req/s
- **Basic** ($37/Mo) — 67,300 calls/Mo, 8 req/s
- **Pro** ($57/Mo) — 417,000 calls/Mo, 20 req/s
- **Scale** ($98/Mo) — 1,585,000 calls/Mo, 45 req/s

## Endpoints

### Markets

#### `GET /v1/markets` — List perpetual products

**Parameters:**
- `quote` (query, optional, string) — Filter by quote currency (e.g. USDT, USDC) Example: `USDT`
- `status` (query, optional, string) — Filter by listing status Example: `Listed`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/phemex-api/v1/markets?quote=USDT&status=Listed"
```

**Response:**
```json
{
    "data": {
        "count": 536,
        "markets": [
            {
                "type": "PerpetualV2",
                "status": "Listed",
                "symbol": "BTCUSDT",
                "lot_size": null,
                "tick_size": "0.1",
                "max_leverage": 100,
                "base_currency": "BTC",
                "contract_size": null,
                "display_symbol": "BTC / USDT",
                "quote_currency": "USDT",
                "settle_currency": "USDT"
            },
            {
                "type": "PerpetualV2",
                "status": "Listed",
                "symbol": "ETHUSDT",
                "lot_size": null,
                "tick_size": "0.01",
                "max_leverage": 100,
                "base_currency": "ETH",
                "contract_size": null,
                "display_symbol": "ETH / USDT",
                "quote_currency": "USDT",
                "settle_currency": "USDT"
            },
            {
                "type": "PerpetualV2",
                "status": "Listed",
                "symbol": "XRPUSDT",
                "lot_size": null,
                "tick_size": "0.0001",
                "max_leverage": 50,
                "base_currency": "XRP",
                "contract_size": null,
                "display_symbol": "XRP / USDT",
                "quote_currency": "USDT",
                "settle_currency": "USDT"
            },
            {
                "type": "PerpetualV2",
        
…(truncated, see openapi.json for full schema)
```

### Tickers

#### `GET /v1/tickers` — 24h tickers for all symbols or one symbol

**Parameters:**
- `symbol` (query, optional, string) — Single symbol; omit for all Example: `BTCUSDT`
- `quote` (query, optional, string) — Filter all-tickers by quote currency
- `limit` (query, optional, string) — Max rows when listing all (1-1000)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/phemex-api/v1/tickers?symbol=BTCUSDT"
```

**Response:**
```json
{
    "data": {
        "ask": 65891.6,
        "bid": 65891.5,
        "low": 63650.9,
        "high": 65997,
        "last": 65890.2,
        "mark": 65891.6,
        "open": 64521.3,
        "index": 65930.94954504,
        "symbol": "BTCUSDT",
        "timestamp": 1781522129699943700,
        "volume_24h": 4187.3963,
        "funding_rate": -0.00010794,
        "turnover_24h": 272146079.05386,
        "open_interest": 2308.9361234,
        "change_pct_24h": 2.1216,
        "pred_funding_rate": -0.00010794
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:30.187Z",
        "request_id": "3fd7337a-9c9a-4fed-b794-a38797bfddd4"
    },
    "status": "ok",
    "message": "Tickers retrieved successfully",
    "success": true
}
```

### Order Book

#### `GET /v1/orderbook` — Order-book depth for a symbol

**Parameters:**
- `symbol` (query, required, string) — Market symbol Example: `BTCUSDT`
- `limit` (query, optional, string) — Levels per side (1-200)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/phemex-api/v1/orderbook?symbol=BTCUSDT"
```

**Response:**
```json
{
    "data": {
        "asks": [
            {
                "qty": 0.878,
                "price": 65891.5
            },
            {
                "qty": 0.04,
                "price": 65891.6
            },
            {
                "qty": 0.001,
                "price": 65891.8
            },
            {
                "qty": 0.002,
                "price": 65892.5
            },
            {
                "qty": 0.002,
                "price": 65897.3
            },
            {
                "qty": 0.303,
                "price": 65898.5
            },
            {
                "qty": 0.464,
                "price": 65898.6
            },
            {
                "qty": 0.341,
                "price": 65899.6
            },
            {
                "qty": 0.028,
                "price": 65906.2
            },
            {
                "qty": 0.001,
                "price": 65914
            },
            {
                "qty": 0.447,
                "price": 65919.4
            },
            {
                "qty": 0.239,
                "price": 65919.9
            },
            {
                "qty": 0.182,
                "price": 65920
            },
            {
                "qty": 0.392,
                "price": 65920.1
            },
            {
                "qty": 0.007,
                "price": 65927.8
            },
            {
                "qty": 0.669,
                "price": 65927.9
            },
…(truncated, see openapi.json for full schema)
```

### Trades

#### `GET /v1/trades` — Recent trades for a symbol

**Parameters:**
- `symbol` (query, required, string) — Market symbol Example: `BTCUSDT`
- `limit` (query, optional, string) — Max trades (1-500)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/phemex-api/v1/trades?symbol=BTCUSDT"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "symbol": "BTCUSDT",
        "trades": [
            {
                "qty": 0.275,
                "side": "Sell",
                "price": 65891.5,
                "timestamp": 1781522130305432600
            },
            {
                "qty": 0.2,
                "side": "Sell",
                "price": 65890.2,
                "timestamp": 1781522129040714200
            },
            {
                "qty": 0.001,
                "side": "Buy",
                "price": 65889.7,
                "timestamp": 1781522128902042400
            },
            {
                "qty": 0.067,
                "side": "Sell",
                "price": 65890.5,
                "timestamp": 1781522127872530700
            },
            {
                "qty": 0.002,
                "side": "Sell",
                "price": 65890.5,
                "timestamp": 1781522127872530700
            },
            {
                "qty": 0.005,
                "side": "Sell",
                "price": 65890.5,
                "timestamp": 1781522127872530700
            },
            {
                "qty": 0.116,
                "side": "Sell",
                "price": 65890.5,
                "timestamp": 1781522127872530700
            },
            {
                "qty": 0.01,
                "side": "Sell",
                "price": 65890.5,
                "timestamp": 1781522127872530700
            },
            {
            
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/phemex-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "Phemex Market Data API",
        "source": "Phemex public REST (api.phemex.com)",
        "endpoints": [
            {
                "path": "/v1/markets",
                "description": "List perpetual products (optional quote / status filter)"
            },
            {
                "path": "/v1/tickers",
                "description": "24h tickers for all symbols, or a single symbol via ?symbol="
            },
            {
                "path": "/v1/orderbook",
                "description": "Order book depth for a symbol (?symbol=BTCUSDT)"
            },
            {
                "path": "/v1/trades",
                "description": "Recent trades for a symbol (?symbol=BTCUSDT)"
            },
            {
                "path": "/v1/meta",
                "description": "This metadata document"
            }
        ],
        "disclaimer": "Unofficial proxy of public Phemex endpoints. Not affiliated with Phemex. Market data only; no guarantees of accuracy or availability.",
        "description": "Public perpetual-futures market data from the Phemex exchange: live products, 24h tickers, order book depth and recent trades. Prices are returned in real (unscaled) units.",
        "base_currency_note": "USDT/USDC settled perpetuals plus inverse contracts"
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:31.297Z",
        "request_id": "3f55a417-a587-4591-8332-15cd1620a331"
    },
    "status": "ok",
    "message": 
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/phemex-api
OpenAPI spec: https://www.oanor.com/api/phemex-api/openapi.json
