Aggregator Endpoints
The Aggregator API provides an alternative interface for accessing o2 Exchange data using market pair notation (e.g., FUEL_USDC) instead of market IDs. These endpoints are designed for integration with cryptocurrency data aggregators and third-party platforms.
Key Difference: Aggregator endpoints use market_pair format (e.g., "FUEL_USDC") instead of numeric market_id values used in standard endpoints.
1. Get Assets
Endpoint: GET /v1/aggregated/assets
Description: Retrieve a list of all available trading assets with their metadata, fees, and deposit/withdrawal capabilities.
curl -X GET \
"https://api.o2.app/v1/aggregated/assets" \
-H "Accept: application/json"Response Structure: Returns a map of asset symbols to asset information.
Source: packages/api/src/app/routes/v1/aggregated/assets.rs:28
2. Get Order Book Depth
Endpoint: GET /v1/aggregated/orderbook
Description: Retrieve order book depth (bids and asks) for a specific market pair.
Query Parameters
curl -X GET \
"https://api.o2.app/v1/aggregated/orderbook" \
-H "Accept: application/json"Query Parameters:
market_pair(required): Market pair in formatBASE_QUOTE(e.g., "FUEL_USDC")depth(optional): Number of price levels to return. Default: 500, Max: 500. Use 0 for full depth.level(optional): Order book level (2 or 3). Currently both return the same aggregated data. Default: 2.
Response Structure:
Source: packages/api/src/app/routes/v1/aggregated/orderbook.rs:41
3. Get Market Summary
Endpoint: GET /v1/aggregated/summary
Description: Get 24-hour market statistics and summary data for all trading pairs.
curl -X GET \
"https://api.o2.app/v1/aggregated/summary" \
-H "Accept: application/json"Response Structure: Returns an array of market summaries for all available pairs.
Source: packages/api/src/app/routes/v1/aggregated/summary.rs:65
4. Get Market Ticker
Endpoint: GET /v1/aggregated/ticker
Description: Get real-time ticker data for all trading pairs, including last price and volume.
curl -X GET \
"https://api.o2.app/v1/aggregated/ticker" \
-H "Accept: application/json"Response Structure: Returns a map of market pairs to ticker data.
Source: packages/api/src/app/routes/v1/aggregated/ticker.rs:21
5. Get Recent Trades
Endpoint: GET /v1/aggregated/trades
Description: Retrieve recent trades for a specific market pair.
Query Parameters
curl -X GET \
"https://api.o2.app/v1/aggregated/trades" \
-H "Accept: application/json"Query Parameters:
market_pair(required): Market pair in formatBASE_QUOTE(e.g., "FUEL_USDC")
Response Structure: Returns an array of recent trades (most recent first).
Source: packages/api/src/app/routes/v1/aggregated/trades.rs:48