GaiaExGaiaEx
API

Perpetual Futures Market Data

Fetch real-time perpetual futures market data on GaiaEx: funding rates, mark prices, open interest, and order books.

AI AGENT READYEquip Claude Code, OpenAI Codex & Antigravity (`agy`) with Official GaiaEx Skills
CLAUDE CODESKILL.md
Claude SKILL.md

Drop-in Claude Code skill with HMAC-SHA256 signing, /fapi/v1 & /fapi/v2 schemas, and secret-redaction guardrails.

Raw ↗
OPENAI CODEXAGENTS.md
Codex AGENTS.md

Drop-in repository AGENTS.md for OpenAI Codex CLI — tick-size rules, rate-limit budgets, and self-custody boundaries.

Raw ↗
ANTIGRAVITYAGY.md
Antigravity AGY.md

Google Antigravity (agy) & Gemini agent spec with verified async Python WebSocket + REST execution templates.

Raw ↗
UNIVERSAL LLMllms.txt
/llms.txt Index

Single-URL machine-readable index of all GaiaEx documentation pages, OpenAPI 3.0 schema, and Postman collection.

Raw ↗

Overview

GaiaEx provides GaiaEx Unified Futures public market data endpoints under https://openapi.gaiaex.com/fapi/v1/*. No authentication is required for these endpoints.

  • Base URL: https://openapi.gaiaex.com
  • Symbol Format: Standard concatenated symbols such as BTCUSDC, ETHUSDC, BTCUSDT, ETHUSDT, and RWA/venture symbols such as AAPLUSDC or GOLDUSDC.
  • Timestamps: All timestamps are returned in UTC milliseconds.
GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/ping

Test Connectivity

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/ping

Test connectivity to the Rest API.

Weight: 1

Parameters: None

Response:

{}
GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/time

Check Server Time

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/time

Test connectivity to the Rest API and get the current server time.

Weight: 1

Parameters: None

Response:

{
  "serverTime": 1743508800000
}
GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/exchangeInfo

Exchange Information

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/exchangeInfo

Current exchange trading rules, rate limits, margin assets, and symbol information (including price precision, quantity precision, tick size, step size, and maximum leverage).

Weight: 1

Parameters: None

Response:

{
  "timezone": "UTC",
  "serverTime": 1743508800000,
  "rateLimits": [
    {
      "rateLimitType": "REQUEST_WEIGHT",
      "interval": "MINUTE",
      "intervalNum": 1,
      "limit": 1200
    },
    {
      "rateLimitType": "ORDERS",
      "interval": "MINUTE",
      "intervalNum": 1,
      "limit": 300
    }
  ],
  "exchangeFilters": [],
  "assets": [
    {
      "asset": "USDT",
      "marginAvailable": true,
      "autoAssetExchange": "0"
    },
    {
      "asset": "USDC",
      "marginAvailable": true,
      "autoAssetExchange": "0"
    }
  ],
  "symbols": [
    {
      "symbol": "BTCUSDC",
      "pair": "BTCUSDC",
      "contractType": "PERPETUAL",
      "deliveryDate": 4133404800000,
      "onboardDate": 1609459200000,
      "status": "TRADING",
      "maintMarginPercent": "2.5000",
      "requiredMarginPercent": "2.5000",
      "maxLeverage": 40,
      "baseAsset": "BTC",
      "quoteAsset": "USDC",
      "marginAsset": "USDC",
      "pricePrecision": 1,
      "quantityPrecision": 5,
      "baseAssetPrecision": 8,
      "quotePrecision": 8,
      "underlyingType": "COIN",
      "orderTypes": [
        "LIMIT",
        "MARKET",
        "STOP",
        "STOP_MARKET",
        "TAKE_PROFIT",
        "TAKE_PROFIT_MARKET"
      ],
      "timeInForce": [
        "GTC",
        "IOC",
        "FOK",
        "GTX"
      ],
      "filters": [
        {
          "filterType": "PRICE_FILTER",
          "minPrice": "0.1",
          "maxPrice": "9999999",
          "tickSize": "0.1"
        },
        {
          "filterType": "LOT_SIZE",
          "minQty": "0.00001",
          "maxQty": "1000000",
          "stepSize": "0.00001"
        },
        {
          "filterType": "MIN_NOTIONAL",
          "notional": "10"
        }
      ]
    }
  ]
}
GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/depth

Order Book

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/depth?symbol=BTCUSDC&limit=5

Query the order book depth for a symbol. Bids and asks are returned as arrays of [price, quantity] strings sorted from best to worst.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringYesTrading symbol (e.g., BTCUSDC, ETHUSDT)
limitintNoNumber of price levels per side (default 20; valid values: 5, 10, 20, 50, 100, 500, 1000)

Response:

{
  "lastUpdateId": 1743508800000,
  "E": 1743508800005,
  "T": 1743508800000,
  "bids": [
    ["67499.5", "1.25000"],
    ["67499.0", "2.50000"]
  ],
  "asks": [
    ["67500.0", "0.85000"],
    ["67500.5", "3.10000"]
  ]
}

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC, ETHUSDC, BTCUSDT)

limit
intOptional

Depth levels (default 20, max 50)

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/trades

Recent Trades List

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/trades?symbol=BTCUSDC&limit=5

Get recent market trades.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringYesTrading symbol (e.g., BTCUSDC, ETHUSDT)
limitintNoDefault 500; max 1000

Response:

[
  {
    "id": 9845712,
    "price": "67500.0",
    "qty": "0.10000",
    "quoteQty": "6750.00",
    "time": 1743508800000,
    "isBuyerMaker": false
  }
]

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC)

limit
intOptional

Default 100; max 500

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/aggTrades

Compressed/Aggregate Trades List

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/aggTrades?symbol=BTCUSDC&limit=5

Get compressed, aggregate market trades. Trades that fill at the same time, from the same order, with the same price will have the quantity aggregated.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringYesTrading symbol (e.g., BTCUSDC, ETHUSDT)
fromIdlongNoID to get aggregate trades from INCLUSIVE
startTimelongNoTimestamp in ms to get aggregate trades from INCLUSIVE
endTimelongNoTimestamp in ms to get aggregate trades until INCLUSIVE
limitintNoDefault 500; max 1000

Response:

[
  {
    "a": 9845712,
    "p": "67500.0",
    "q": "0.10000",
    "f": 9845712,
    "l": 9845712,
    "T": 1743508800000,
    "m": false
  }
]
FieldTypeDescription
alongAggregate tradeId
pstringPrice
qstringQuantity
flongFirst tradeId
llongLast tradeId
TlongTimestamp in ms
mbooleanWas the buyer the maker?

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC)

limit
intOptional

Default 500; max 1000

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/klines

Kline/Candlestick Data

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/klines?symbol=BTCUSDC&interval=1h&limit=5

Kline/candlestick bars for a symbol. Klines are uniquely identified by their open time.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringYesTrading symbol (e.g., BTCUSDC, ETHUSDT)
intervalstringYesKline interval: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M
startTimelongNoStart time in ms
endTimelongNoEnd time in ms
limitintNoDefault 500; max 1500

Response:

[
  [
    1743505200000,
    "67200.0",
    "67650.0",
    "67100.0",
    "67500.0",
    "142.50000000",
    1743508799999,
    "9618750.00000000",
    0,
    "71.25000000",
    "4809375.00000000",
    "0"
  ]
]

Kline Array Elements:

  1. Open time (ms)
  2. Open price
  3. High price
  4. Low price
  5. Close price
  6. Volume (base asset)
  7. Close time (ms)
  8. Quote asset volume
  9. Number of trades
  10. Taker buy base asset volume
  11. Taker buy quote asset volume
  12. Ignore

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC, GOLDUSDC)

interval
stringRequired

1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1M

limit
intOptional

Default 500; max 1500

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/klines

Continuous Contract Kline/Candlestick Data

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/klines?symbol=BTCUSDC&interval=1h&limit=5

Kline/candlestick bars for a specific contract type.

Query Parameters:

ParameterTypeRequiredDescription
pairstringYesUnderlying pair (e.g., BTCUSDC, ETHUSDT)
contractTypestringYesPERPETUAL
intervalstringYesKline interval (e.g., 1m, 5m, 15m, 1h, 4h, 1d)
startTimelongNoStart time in ms
endTimelongNoEnd time in ms
limitintNoDefault 500; max 1500

Response: Same 12-element kline array format as GET /fapi/v1/klines.

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC, GOLDUSDC)

interval
stringRequired

1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1M

limit
intOptional

Default 500; max 1500

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/klines

Index Price Kline/Candlestick Data

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/klines?symbol=BTCUSDC&interval=1h&limit=5

Kline/candlestick bars for the index price of a pair.

Query Parameters:

ParameterTypeRequiredDescription
pairstringYesUnderlying pair (e.g., BTCUSDC, ETHUSDT)
intervalstringYesKline interval (e.g., 1m, 5m, 15m, 1h, 4h, 1d)
startTimelongNoStart time in ms
endTimelongNoEnd time in ms
limitintNoDefault 500; max 1500

Response: Same 12-element kline array format as GET /fapi/v1/klines.

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC, GOLDUSDC)

interval
stringRequired

1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1M

limit
intOptional

Default 500; max 1500

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/klines

Mark Price Kline/Candlestick Data

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/klines?symbol=BTCUSDC&interval=1h&limit=5

Kline/candlestick bars for the mark price of a symbol.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringYesTrading symbol (e.g., BTCUSDC, ETHUSDT)
intervalstringYesKline interval (e.g., 1m, 5m, 15m, 1h, 4h, 1d)
startTimelongNoStart time in ms
endTimelongNoEnd time in ms
limitintNoDefault 500; max 1500

Response: Same 12-element kline array format as GET /fapi/v1/klines.

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC, GOLDUSDC)

interval
stringRequired

1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1M

limit
intOptional

Default 500; max 1500

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/ticker/24hr

24hr Ticker Price Change Statistics

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/ticker/24hr?symbol=BTCUSDC

24 hour rolling window price change statistics. If symbol is omitted, tickers for all active symbols are returned in an array.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringNoTrading symbol (e.g., BTCUSDC). Omit to return all symbols.

Response:

{
  "symbol": "BTCUSDC",
  "priceChange": "1250.0",
  "priceChangePercent": "1.887",
  "weightedAvgPrice": "67500.0",
  "lastPrice": "67500.0",
  "lastQty": "0",
  "openPrice": "66250.0",
  "highPrice": "67837.5",
  "lowPrice": "65918.75",
  "volume": "18540.2500",
  "quoteVolume": "1251466875.0000",
  "openTime": 1743422400000,
  "closeTime": 1743508800000,
  "firstId": 0,
  "lastId": 0,
  "count": 0,
  "openInterest": "8420.5"
}

Parameters

symbol
stringOptional

Trading symbol (omit for all symbols)

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/ticker/price

Symbol Price Ticker

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/ticker/price?symbol=BTCUSDC

Latest price for a symbol or all symbols.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringNoTrading symbol (e.g., BTCUSDC). Omit to return all symbols.

Response:

{
  "symbol": "BTCUSDC",
  "price": "67500.0",
  "time": 1743508800000
}

Parameters

symbol
stringOptional

Trading symbol (omit for all symbols)

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/ticker/bookTicker

Symbol Order Book Ticker

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/ticker/bookTicker?symbol=BTCUSDC

Best price and quantity on the order book for a symbol or all symbols.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringNoTrading symbol (e.g., BTCUSDC). Omit to return all symbols.

Response:

{
  "symbol": "BTCUSDC",
  "bidPrice": "67499.5",
  "bidQty": "1.25000",
  "askPrice": "67500.0",
  "askQty": "0.85000",
  "time": 1743508800000
}

Parameters

symbol
stringOptional

Trading symbol (omit for all symbols)

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/premiumIndex

Mark Price & Funding Rate

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/premiumIndex?symbol=BTCUSDC

Mark Price and Funding Rate for a symbol or all symbols.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringNoTrading symbol (e.g., BTCUSDC). Omit to return all symbols.

Response:

{
  "symbol": "BTCUSDC",
  "markPrice": "67500.0",
  "indexPrice": "67498.5",
  "estimatedSettlePrice": "67498.5",
  "lastFundingRate": "0.00001250",
  "nextFundingTime": 1743512400000,
  "interestRate": "0.00010000",
  "time": 1743508800000
}

Parameters

symbol
stringOptional

Trading symbol (omit for all symbols)

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/fundingRate

Get Funding Rate History

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/fundingRate?symbol=BTCUSDC&limit=5

Query funding rate history.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringNoTrading symbol (e.g., BTCUSDC, ETHUSDT)
startTimelongNoTimestamp in ms to get funding rate from INCLUSIVE
endTimelongNoTimestamp in ms to get funding rate until INCLUSIVE
limitintNoDefault 100; max 1000

Response:

[
  {
    "symbol": "BTCUSDC",
    "fundingRate": "0.00001250",
    "fundingTime": 1743508800000,
    "markPrice": "67500.0"
  }
]

Parameters

symbol
stringOptional

Trading symbol (e.g. BTCUSDC)

limit
intOptional

Default 100; max 1000

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/openInterest

Open Interest

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/openInterest?symbol=BTCUSDC

Get present open interest of a specific symbol.

Query Parameters:

ParameterTypeRequiredDescription
symbolstringYesTrading symbol (e.g., BTCUSDC)

Response:

{
  "symbol": "BTCUSDC",
  "openInterest": "8420.5",
  "time": 1743508800000
}

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC)

GET20/s IPhttps://openapi.gaiaex.com/fapi/v1/technicals

Multi-Timeframe Technical Signals

LIVE SANDBOXhttps://openapi.gaiaex.com/fapi/v1/technicals?symbol=BTCUSDC

Returns a pre-computed multi-timeframe technical indicator matrix (RSI, MACD, EMA, Ichimoku, ATR, Bollinger Bands) across 8 timeframes for a symbol. Each indicator signal is 1 (bullish), -1 (bearish), or 0 (neutral).

Query Parameters:

ParameterTypeRequiredDescription
symbolstringYesTrading symbol (e.g., BTCUSDC, GOLDUSDC)

Parameters

symbol
stringRequired

Trading symbol (e.g. BTCUSDC, GOLDUSDC)