Historical Data

Historical Data

Overview

GX Exchange provides access to historical trading data through the built-in PostgreSQL indexer and REST API. Historical data is available for all markets from genesis.

Available Data

Data TypeDescriptionRetention
Trade HistoryEvery matched trade with price, size, timestampIndefinite
Candles (OHLCV)1m, 5m, 15m, 1h, 4h, 1d intervalsIndefinite
Funding Rates8-hour funding rate snapshotsIndefinite
Open InterestAggregate open interest per market1 year rolling
LiquidationsAll liquidation events with detailsIndefinite
Orderbook SnapshotsL2 orderbook snapshots (5-minute intervals)90 days

API Access

REST Endpoints

# Historical trades
GET /v4/trades?market=BTC-USD&start=1700000000&end=1700086400
 
# OHLCV candles
GET /v4/candles?market=BTC-USD&interval=1h&start=1700000000&limit=500
 
# Funding rate history
GET /v4/funding?market=BTC-USD&limit=100
 
# Liquidation history
GET /v4/liquidations?market=BTC-USD&limit=100

Response Format

All responses are JSON with consistent schema:

{
  "data": [...],
  "pagination": {
    "next_cursor": "...",
    "has_more": true
  }
}

Rate Limits

TierRequests/MinuteBurst
Free6010
Authenticated30050
GX Staker1,000100

Data Export

Users can export their personal trade history as CSV from the GX Exchange dashboard:

  • All trades with entry/exit prices, PnL, fees
  • Staking reward history
  • Referral earnings
  • Deposit and withdrawal history

Indexer Architecture

GX Chain includes a built-in PostgreSQL indexer that writes historical data as blocks are produced. The indexer operates independently of the matching engine and does not affect trading performance.