GTX DEX API Reference
The GTX DEX API provides comprehensive access to market data, trading information, and user account details. Built on a high-performance indexer, our API delivers real-time and historical data for all trading pairs and user activities.Base URL
All API endpoints are RESTful and return JSON responses. The API supports both HTTP and HTTPS protocols.
API Features
Market Data
Real-time price feeds, order book depth, and trading volumes
Trading History
Complete trade history and candlestick data with multiple timeframes
Order Management
User order history, open orders, and order status tracking
Account Data
User balances, permissions, and account information
Rate Limits
| Endpoint Type | Rate Limit | Window |
|---|---|---|
| Market Data | 1200 req/min | 1 minute |
| User Data | 600 req/min | 1 minute |
| Kline Data | 300 req/min | 1 minute |
Response Format
All API responses follow a consistent JSON structure:Successful Response
Error Response
Data Types
Price Precision
- All prices are returned as strings to maintain precision
- Prices are denominated in the quote currency of the trading pair
- Use appropriate decimal handling in your application
Timestamps
- Unix timestamps in milliseconds for API responses
- Unix timestamps in seconds for internal processing
- All timestamps are in UTC
Order Status
| Status | Description |
|---|---|
NEW | Order placed but not yet processed |
OPEN | Order active in the order book |
PARTIALLY_FILLED | Order partially executed |
FILLED | Order completely executed |
CANCELLED | Order cancelled by user |
REJECTED | Order rejected by system |
Order Types
| Type | Description |
|---|---|
LIMIT | Limit order with specified price |
MARKET | Market order for immediate execution |
Order Sides
| Side | Description |
|---|---|
Buy | Buy order (bid) |
Sell | Sell order (ask) |
Error Codes
| HTTP Status | Error Type | Description |
|---|---|---|
| 400 | Bad Request | Invalid parameters or missing required fields |
| 404 | Not Found | Requested resource not found |
| 408 | Timeout | Query took too long to process |
| 500 | Internal Error | Server error or database issue |
API Integration
REST Endpoints
Detailed endpoint documentation and examples
WebSocket Streams
Real-time data streaming API
WebSocket API
For real-time data streams, GTX DEX also provides WebSocket connections:WebSocket documentation is available in the Developer Tools section.
Ready to start building with GTX DEX? Check out our quickstart guide or dive into the endpoint documentation.
