# GMX API
> Live oracle prices from GMX, the leading decentralised perpetual-swap exchange on Arbitrum and Avalanche. Unlike order-book DEXs, GMX executes trades against its GLP/GM liquidity pools at prices set by a keeper-signed oracle that quotes a MIN and a MAX price per token — the execution band traders open and close positions against. The prices endpoint returns every supported token's min/max/mid oracle price and the execution spread; the price endpoint returns a single token by symbol; the tokens endpoint returns the supported-token registry (contract address, decimals, synthetic flag); the spread endpoint ranks tokens by their oracle execution spread (the on-chain cost band of trading that token on GMX). Every endpoint accepts a chain parameter (arbitrum default, or avalanche). Read live from GMX's public oracle, nothing stored. This is GMX's own pool-DEX oracle min/max-price and execution-spread layer — distinct from centralised-exchange tickers, aggregate price feeds and order-book DEX feeds such as dYdX and Hyperliquid.

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

## Pricing
- **Free** (Free) — 1,000 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 40,000 calls/Mo, 10 req/s
- **Pro** ($24/Mo) — 225,000 calls/Mo, 30 req/s
- **Scale** ($56/Mo) — 1,500,000 calls/Mo, 100 req/s

## Endpoints

### Price

#### `GET /v1/price` — Oracle price for a single token by symbol

**Parameters:**
- `token` (query, required, string) — Token symbol Example: `BTC`
- `chain` (query, optional, string) — arbitrum (default) or avalanche Example: `arbitrum`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gmx-api/v1/price?token=BTC&chain=arbitrum"
```

**Response:**
```json
{
    "data": {
        "chain": "arbitrum",
        "source": "GMX",
        "symbol": "BTC",
        "address": "0x47904963fc8b2340414262125aF798B9655E58Cd",
        "decimals": 8,
        "synthetic": true,
        "spread_bps": 0,
        "spread_usd": 0,
        "updated_at": "2026-06-10T22:57:54.021Z",
        "max_price_usd": 61374.4125,
        "mid_price_usd": 61374.4125,
        "min_price_usd": 61374.4125
    },
    "meta": {
        "timestamp": "2026-06-10T22:57:54.616Z",
        "request_id": "a864b73d-d48e-4934-a991-acd8aeceb687"
    },
    "status": "ok",
    "message": "Price retrieved successfully",
    "success": true
}
```

#### `GET /v1/prices` — Min/max/mid oracle price and spread for every token

**Parameters:**
- `chain` (query, optional, string) — arbitrum (default) or avalanche Example: `arbitrum`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gmx-api/v1/prices?chain=arbitrum"
```

**Response:**
```json
{
    "data": {
        "chain": "arbitrum",
        "count": 125,
        "prices": [
            {
                "symbol": "0G",
                "address": "0x95c317066CF214b2E6588B2685D949384504F51e",
                "decimals": 18,
                "synthetic": true,
                "spread_bps": 19.2887,
                "spread_usd": 0.000527063,
                "updated_at": "2026-06-10T22:57:54.021Z",
                "max_price_usd": 0.273513203,
                "mid_price_usd": 0.273249671,
                "min_price_usd": 0.27298614
            },
            {
                "symbol": "AAVE",
                "address": "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196",
                "decimals": 18,
                "synthetic": null,
                "spread_bps": 2.4643,
                "spread_usd": 0.0149916,
                "updated_at": "2026-06-10T22:57:54.021Z",
                "max_price_usd": 60.8414042,
                "mid_price_usd": 60.8339084,
                "min_price_usd": 60.8264127
            },
            {
                "symbol": "ADA",
                "address": "0x53186c8419BEB83fE4Da74F7875041a1287337ED",
                "decimals": 6,
                "synthetic": true,
                "spread_bps": 2.756,
                "spread_usd": 4.427e-5,
                "updated_at": "2026-06-10T22:57:54.021Z",
                "max_price_usd": 0.160653895,
                "mid_price_usd": 0.16063176,
                "min_price_usd": 0.160609626
     
…(truncated, see openapi.json for full schema)
```

### Tokens

#### `GET /v1/tokens` — Supported-token registry — address, decimals, synthetic flag

**Parameters:**
- `chain` (query, optional, string) — arbitrum (default) or avalanche Example: `arbitrum`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gmx-api/v1/tokens?chain=arbitrum"
```

**Response:**
```json
{
    "data": {
        "chain": "arbitrum",
        "count": 127,
        "source": "GMX",
        "tokens": [
            {
                "symbol": "0G",
                "address": "0x95c317066CF214b2E6588B2685D949384504F51e",
                "decimals": 18,
                "synthetic": true
            },
            {
                "symbol": "AAVE",
                "address": "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196",
                "decimals": 18,
                "synthetic": null
            },
            {
                "symbol": "ADA",
                "address": "0x53186c8419BEB83fE4Da74F7875041a1287337ED",
                "decimals": 6,
                "synthetic": true
            },
            {
                "symbol": "AERO",
                "address": "0xEcc5eb985Ddbb8335b175b0A2A1144E4c978F1f6",
                "decimals": 18,
                "synthetic": true
            },
            {
                "symbol": "AI16Z",
                "address": "0xBb69bd9dc152C2c0F083507641a46193d2B61EBb",
                "decimals": 9,
                "synthetic": true
            },
            {
                "symbol": "AIXBT",
                "address": "0xcA543Cb8bCC76e4E0A034F56EB40a1029bDFd70E",
                "decimals": 18,
                "synthetic": true
            },
            {
                "symbol": "ALGO",
                "address": "0x72Cd3a21aA7A898028d9501868Fbe6dED0020434",
                "decimals": 6,
                "synthetic"
…(truncated, see openapi.json for full schema)
```

### Spread

#### `GET /v1/spread` — Tokens ranked by GMX oracle execution spread

**Parameters:**
- `chain` (query, optional, string) — arbitrum (default) or avalanche Example: `arbitrum`
- `limit` (query, optional, string) — Max results (1-300) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/gmx-api/v1/spread?chain=arbitrum&limit=50"
```

**Response:**
```json
{
    "data": {
        "note": "Tokens ranked by GMX oracle execution spread (max-min price band), widest first.",
        "chain": "arbitrum",
        "count": 50,
        "source": "GMX",
        "spread": [
            {
                "symbol": "BERA",
                "spread_bps": 21.2018,
                "spread_usd": 0.00049018,
                "mid_price_usd": 0.231197278
            },
            {
                "symbol": "0G",
                "spread_bps": 19.2855,
                "spread_usd": 0.000526974,
                "mid_price_usd": 0.273248802
            },
            {
                "symbol": "GMX",
                "spread_bps": 17.5677,
                "spread_usd": 0.00942231,
                "mid_price_usd": 5.36342529
            },
            {
                "symbol": "APE_deprecated",
                "spread_bps": 16.128,
                "spread_usd": 0.00018722,
                "mid_price_usd": 0.11608361
            },
            {
                "symbol": "ANIME",
                "spread_bps": 15.2821,
                "spread_usd": 4.25079e-6,
                "mid_price_usd": 0.00278154079
            },
            {
                "symbol": "MELANIA",
                "spread_bps": 14.6814,
                "spread_usd": 0.0001127498,
                "mid_price_usd": 0.0767977992
            },
            {
                "symbol": "BOME",
                "spread_bps": 14.6171,
                "spread_usd": 5.92623e-7,
            
…(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/gmx-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "GMX oracle API (arbitrum-api.gmxinfra.io / avalanche-api.gmxinfra.io, live)",
        "service": "gmx-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/price": "One token's oracle price by symbol (token=BTC, chain=arbitrum).",
            "GET /v1/prices": "Every token's min/max/mid oracle price and execution spread (chain=arbitrum|avalanche).",
            "GET /v1/spread": "Tokens ranked by GMX oracle execution spread, widest first (chain=arbitrum, limit=50).",
            "GET /v1/tokens": "Supported-token registry — address, decimals, synthetic flag (chain=arbitrum)."
        },
        "description": "Live oracle prices from GMX, the leading decentralised perpetual-swap exchange on Arbitrum and Avalanche. Unlike order-book DEXs, GMX executes trades against its GLP/GM liquidity pools at prices from a keeper-signed oracle that quotes a MIN and MAX price per token (the execution band). The prices endpoint returns every token's min/max/mid oracle price and execution spread; the price endpoint returns one token by symbol; the tokens endpoint returns the supported-token registry (address, decimals, synthetic flag); the spread endpoint ranks tokens by oracle execution spread. All accept a chain parameter (arbitrum default, or avalanche). Live, no key, nothing stored. Distinct from centralised tickers, aggregate price feeds and order-book DEX feeds (dYdX, Hyperliquid) — this is GMX's own pool-DE
…(truncated, see openapi.json for full schema)
```


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