# edgeX Perpetuals DEX API
> Live market data for edgeX, the StarkEx-based perpetuals DEX, with no key. List every perpetual contract with its specs; pull a 24h ticker with last/open/high/low price, percentage change and traded volume; read the live order book at 15 or 200 levels; and get the latest funding rate with the oracle, mark and index prices. Symbols are accepted by human name (BTCUSD, ETHUSD, SOLUSD) and resolved to edgeX contract ids automatically — ideal for derivatives dashboards and funding-rate monitors.

## 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/edgex-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 4 req/s
- **Basic** ($18/Mo) — 56,500 calls/Mo, 10 req/s
- **Pro** ($50/Mo) — 224,000 calls/Mo, 24 req/s
- **Business** ($109/Mo) — 905,000 calls/Mo, 56 req/s

## Endpoints

### Markets

#### `GET /v1/contracts` — List every perpetual contract with specs

**Parameters:**
- `base` (query, optional, string) — Filter by base coin prefix Example: `BTC`

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

**Response:**
```json
{
    "data": {
        "count": 1,
        "venue": "edgex",
        "contracts": [
            {
                "name": "BTCUSD",
                "base_coin": null,
                "step_size": 0.001,
                "tick_size": 0.1,
                "quote_coin": null,
                "contract_id": "10000001",
                "max_leverage": 10,
                "min_order_size": 0.003
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:59.198Z",
        "request_id": "66e1b5ea-f44d-4901-916c-6cdf2c75e78d"
    },
    "status": "ok",
    "message": "Contracts retrieved successfully",
    "success": true
}
```

#### `GET /v1/depth` — Live order book for a contract

**Parameters:**
- `symbol` (query, required, string) — edgeX contract name Example: `ETHUSD`
- `level` (query, optional, string) — Order book levels: 15 or 200 Example: `15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/edgex-api/v1/depth?symbol=ETHUSD&level=15"
```

**Response:**
```json
{
    "data": {
        "asks": [
            {
                "size": 0.51,
                "price": 1741.41
            },
            {
                "size": 0.29,
                "price": 1741.48
            },
            {
                "size": 482.76,
                "price": 1741.55
            },
            {
                "size": 154.51,
                "price": 1741.59
            },
            {
                "size": 146.09,
                "price": 1741.66
            },
            {
                "size": 144.67,
                "price": 1741.7
            },
            {
                "size": 0.23,
                "price": 1741.75
            },
            {
                "size": 418.48,
                "price": 1741.79
            },
            {
                "size": 193.94,
                "price": 1741.86
            },
            {
                "size": 123.46,
                "price": 1741.93
            },
            {
                "size": 79.37,
                "price": 1741.97
            },
            {
                "size": 254.82,
                "price": 1742.02
            },
            {
                "size": 0.52,
                "price": 1742.09
            },
            {
                "size": 76.63,
                "price": 1742.13
            },
            {
                "size": 73.58,
                "price": 1742.2
            }
        ],
        "bids": [
            {
                "size": 345
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/funding` — Latest funding rate with mark/oracle/index price

**Parameters:**
- `symbol` (query, required, string) — edgeX contract name Example: `BTCUSD`

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

**Response:**
```json
{
    "data": {
        "name": "BTCUSD",
        "mark_price": 65951.95000059903,
        "contract_id": "10000001",
        "index_price": 65934.268332833,
        "funding_rate": 5.0e-5,
        "funding_time": "1781510400000",
        "oracle_price": 65951.95000059903,
        "funding_timestamp": "1781522100000"
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:59.647Z",
        "request_id": "d9115afc-8b6d-424c-9207-ab1e48359cfb"
    },
    "status": "ok",
    "message": "Funding retrieved successfully",
    "success": true
}
```

#### `GET /v1/ticker` — 24h ticker for a perpetual contract

**Parameters:**
- `symbol` (query, required, string) — edgeX contract name Example: `BTCUSD`

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

**Response:**
```json
{
    "data": {
        "low": 63649.3,
        "high": 65980.5,
        "last": 65947.9,
        "name": "BTCUSD",
        "open": 64528.8,
        "close": 65947.9,
        "trades": 59388,
        "volume": 6292.365,
        "turnover": 409626235.9591,
        "contract_id": "10000001",
        "index_price": 65979.568864727,
        "funding_rate": 5.0e-5,
        "oracle_price": 65971.99500072747,
        "price_change": 1419.1,
        "price_change_pct": 0.021991
    },
    "meta": {
        "timestamp": "2026-06-15T11:15:59.929Z",
        "request_id": "efff5920-e1d5-41da-be13-f17390ebf294"
    },
    "status": "ok",
    "message": "Ticker retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Venue metadata & endpoint guide

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

**Response:**
```json
{
    "data": {
        "chain": "StarkEx (Ethereum L2)",
        "venue": "edgeX",
        "source": "edgeX public REST (pro.edgex.exchange/api/v1/public), keyless",
        "examples": {
            "depth": "/v1/depth?symbol=ETHUSD&level=15",
            "ticker": "/v1/ticker?symbol=BTCUSD",
            "funding": "/v1/funding?symbol=BTCUSD",
            "contracts": "/v1/contracts?base=BTC"
        },
        "endpoints": {
            "/v1/depth": "live order book (symbol, level=15 or 200)",
            "/v1/ticker": "24h ticker for a contract: last/open/high/low, change, volume (symbol=BTCUSD)",
            "/v1/funding": "latest funding rate with mark/oracle/index price (symbol=BTCUSD)",
            "/v1/contracts": "list every perpetual contract with specs (filter base=BTC)"
        },
        "instrument": "perpetual futures",
        "cache_ttl_ms": 5000
    },
    "meta": {
        "timestamp": "2026-06-15T11:16:00.037Z",
        "request_id": "518bc846-3ba8-4055-8760-b36d453dca18"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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