# WEEX Market Data API
> Real-time perpetual-futures market data from the WEEX crypto exchange. List every live perpetual contract with its underlying index, quote and settle currency, contract value, tick size and size increment; pull 24-hour tickers for all 700+ contracts at once or one at a time (last price, best bid and ask, 24h high and low, traded and base volume, percentage change, mark price and index price); read full order-book depth with best bid, best ask and computed spread; and stream the most recent trades with price, size, notional value and side. Symbols use the WEEX cmt_ prefix (cmt_btcusdt) and accept either form (BTCUSDT or cmt_btcusdt). A short protective cache keeps responses fast while staying within a few seconds of the exchange. Distinct from our BitMEX, BloFin, Bitunix and Phemex exchange feeds: this surfaces the WEEX order book, ticker tape and contract 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/weex-api/..."
```

## Pricing
- **Free** (Free) — 1,820 calls/Mo, 2 req/s
- **Basic** ($14/Mo) — 53,600 calls/Mo, 8 req/s
- **Pro** ($37/Mo) — 224,000 calls/Mo, 20 req/s
- **Scale** ($82/Mo) — 908,000 calls/Mo, 45 req/s

## Endpoints

### Contracts

#### `GET /v1/contracts` — List perpetual contracts

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

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/weex-api/v1/contracts?quote=USDT"
```

**Response:**
```json
{
    "data": {
        "count": 747,
        "exchange": "WEEX",
        "contracts": [
            {
                "symbol": "cmt_btcusdt",
                "tick_size": "1",
                "underlying": "BTC",
                "settle_coin": "USDT",
                "contract_value": "0.0001",
                "quote_currency": "USDT",
                "size_increment": "4"
            },
            {
                "symbol": "cmt_ethusdt",
                "tick_size": "2",
                "underlying": "ETH",
                "settle_coin": "USDT",
                "contract_value": "0.001",
                "quote_currency": "USDT",
                "size_increment": "3"
            },
            {
                "symbol": "cmt_bchusdt",
                "tick_size": "2",
                "underlying": "BCH",
                "settle_coin": "USDT",
                "contract_value": "0.01",
                "quote_currency": "USDT",
                "size_increment": "2"
            },
            {
                "symbol": "cmt_ltcusdt",
                "tick_size": "2",
                "underlying": "LTC",
                "settle_coin": "USDT",
                "contract_value": "0.1",
                "quote_currency": "USDT",
                "size_increment": "1"
            },
            {
                "symbol": "cmt_dogeusdt",
                "tick_size": "5",
                "underlying": "DOGE",
                "settle_coin": "USDT",
                "contract_value": 
…(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

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

**Response:**
```json
{
    "data": {
        "last": 65920.1,
        "symbol": "cmt_btcusdt",
        "low_24h": 63650.8,
        "best_ask": 65920.2,
        "best_bid": 65920.1,
        "high_24h": 65992.2,
        "timestamp": "1781522114387",
        "mark_price": 65927.3,
        "index_price": 65952.667,
        "funding_rate": null,
        "change_pct_24h": 2.156,
        "base_volume_24h": 47425.857,
        "volume_24h_usdt": 3089294540.53364
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:14.681Z",
        "request_id": "ac5f9a43-846b-461a-b1ed-4c7c31999804"
    },
    "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/weex-api/v1/orderbook?symbol=BTCUSDT"
```

**Response:**
```json
{
    "data": {
        "asks": [
            {
                "size": 2.9676,
                "price": 65920.2
            },
            {
                "size": 2.7614,
                "price": 65920.4
            },
            {
                "size": 0.4158,
                "price": 65920.5
            },
            {
                "size": 0.5776,
                "price": 65920.8
            },
            {
                "size": 0.4245,
                "price": 65921.2
            },
            {
                "size": 0.5557,
                "price": 65921.6
            },
            {
                "size": 0.5924,
                "price": 65921.8
            },
            {
                "size": 0.3868,
                "price": 65922
            },
            {
                "size": 0.489,
                "price": 65922.2
            },
            {
                "size": 0.4321,
                "price": 65922.4
            },
            {
                "size": 0.4031,
                "price": 65922.6
            },
            {
                "size": 0.4368,
                "price": 65922.8
            },
            {
                "size": 0.519,
                "price": 65923
            },
            {
                "size": 0.6155,
                "price": 65923.2
            },
            {
                "size": 0.5019,
                "price": 65923.4
            }
        ],
        "bids": [
            {
                "siz
…(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/weex-api/v1/trades?symbol=BTCUSDT"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "symbol": "cmt_btcusdt",
        "trades": [
            {
                "side": "sell",
                "size": 0.0035,
                "time": 1781522115201,
                "price": 65920.1,
                "value": 230.72035
            },
            {
                "side": "sell",
                "size": 0.0026,
                "time": 1781522114994,
                "price": 65920.1,
                "value": 171.39226
            },
            {
                "side": "sell",
                "size": 0.0013,
                "time": 1781522114789,
                "price": 65920.1,
                "value": 85.69613
            },
            {
                "side": "sell",
                "size": 0.0046,
                "time": 1781522114587,
                "price": 65920.1,
                "value": 303.23246
            },
            {
                "side": "sell",
                "size": 0.0044,
                "time": 1781522114383,
                "price": 65920.1,
                "value": 290.04844
            },
            {
                "side": "buy",
                "size": 0.0025,
                "time": 1781522114181,
                "price": 65920.1,
                "value": 164.80025
            },
            {
                "side": "buy",
                "size": 0.001,
                "time": 1781522114042,
                "price": 65920,
                "value": 65.92
            },
            {
…(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/weex-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "name": "WEEX Market Data API",
        "source": "WEEX public contract REST (api-contract.weex.com)",
        "endpoints": [
            {
                "path": "/v1/contracts",
                "description": "List perpetual contracts (optional quote filter)"
            },
            {
                "path": "/v1/tickers",
                "description": "24h tickers for all symbols, or one 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 WEEX endpoints. Not affiliated with WEEX. Market data only; no guarantees of accuracy or availability.",
        "description": "Public perpetual-futures market data from the WEEX exchange: contract specifications, 24h tickers, order-book depth and recent trades.",
        "symbol_note": "Symbols use the cmt_ prefix (e.g. cmt_btcusdt). You may pass BTCUSDT or cmt_btcusdt."
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:15.539Z",
        "request_id": "aa338af8-0b70-47de-b019-77fcb219bf08"
    },
    "status": "ok",
    "message": "Meta",
    "success":
…(truncated, see openapi.json for full schema)
```


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