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 Type | Description | Retention |
|---|---|---|
| Trade History | Every matched trade with price, size, timestamp | Indefinite |
| Candles (OHLCV) | 1m, 5m, 15m, 1h, 4h, 1d intervals | Indefinite |
| Funding Rates | 8-hour funding rate snapshots | Indefinite |
| Open Interest | Aggregate open interest per market | 1 year rolling |
| Liquidations | All liquidation events with details | Indefinite |
| Orderbook Snapshots | L2 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=100Response Format
All responses are JSON with consistent schema:
{
"data": [...],
"pagination": {
"next_cursor": "...",
"has_more": true
}
}Rate Limits
| Tier | Requests/Minute | Burst |
|---|---|---|
| Free | 60 | 10 |
| Authenticated | 300 | 50 |
| GX Staker | 1,000 | 100 |
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.