Market Data Endpoints
V2 Aggregated Endpoints (Recommended)
With the introduction of AMM V2, we now provide aggregated endpoints that combine both spot engine and AMM liquidity. These V2 endpoints are recommended for new integrations as they provide more comprehensive market data.
V1 vs V2 Interface Differences
Data Source
Spot engine only
Spot engine + AMM aggregated
Liquidity
Order book only
Order book + AMM liquidity
Trades
Spot engine trades only
All trades (spot + AMM)
Klines
Spot engine volume only
Combined volume from all sources
Depth
Order book depth only
Merged depth with AMM liquidity
Performance
Standard
Optimized with AMM integration
Recommendation
Legacy support
Use V2 for new integrations
Key Advantages of V2 Interfaces:
Enhanced Liquidity: Includes AMM pool liquidity mapped to order book
Complete Market View: Shows all trading activity (spot + AMM)
Better Price Discovery: AMM provides additional price levels
Unified Data: Single endpoint for comprehensive market data
Future-Proof: Designed for the new AMM V2 architecture
Migration Guide:
Replace
/klines
with/klines/v2
Replace
/depth
with/depth/v2
Replace
/latest-trades
with/latest-trades/v2
Response format remains the same, but data includes AMM sources
Get order book by pool id
pool_id
0.00000001 ~ 10000
limit
order depth
GET /api/v1/depth?pool_id=text HTTP/1.1
Host: api-v1.1dex.com
Accept: */*
order depth
{
"data": {
"asks": [
[
"text"
]
],
"bids": [
[
"text"
]
],
"pool_id": 1,
"precision": "text",
"timestamp": 1
}
}
Get kline data by pool id and interval
pool id
interval
start timestamp
end timestamp
kline data
GET /api/v1/klines?pool_id=text&interval=1m HTTP/1.1
Host: api-v1.1dex.com
Accept: */*
kline data
{
"data": [
{
"close": 1,
"count": 1,
"high": 1,
"interval": "text",
"low": 1,
"open": 1,
"pool_id": 1,
"timestamp": "text",
"turnover": 1,
"volume": 1
}
]
}
Get latest trades
pool_id
limit count
trade list
GET /api/v1/latest-trades HTTP/1.1
Host: api-v1.1dex.com
Accept: */*
trade list
{
"data": [
{
"buyer": "text",
"pool_id": 1,
"price": "text",
"quantity": "text",
"seller": "text",
"side": "buy",
"traded_at": "text"
}
]
}
Last updated