Skip to main content

API Overview

QsnDEX exposes a comprehensive REST API that powers all frontend interactions and is available for third-party integrations.

Base URLs

EnvironmentURL
Productionhttps://api.qsndex.xyz
Local Developmenthttp://localhost:8080

Interactive Documentation

Swagger UI is available for exploring and testing all endpoints:

Response Format

All API responses are returned as JSON. A typical successful response follows this structure:

{
"success": true,
"data": { ... }
}

Error responses include a descriptive message:

{
"success": false,
"error": "Description of the error"
}

Chain Selection

QsnDEX supports multiple chains. Specify the target chain using the chain_id query parameter:

ChainChain ID
Taiko167000
Arbitrum42161

Example:

GET /api/tokens?chain_id=167000

If chain_id is omitted, the API defaults to the primary supported chain.

Rate Limiting

Rate limiting is enforced per-endpoint using Redis. Limits vary by resource intensity:

Endpoint GroupRate Limit
AI Chat / Analysis10 requests per hour
Autopilot5 requests per hour
Safety (Anti-Rug Shield)20 requests per hour
General endpointsNo strict limit (fair use)

Exceeding the rate limit returns HTTP 429 with a Retry-After header.

Endpoint Groups

The API provides 50+ endpoints organized into the following groups:

GroupPrefixDescription
Tokens/api/tokens, /api/pricesToken listings, search, details, price data, OHLC history
Pools/api/pools, /api/ilLiquidity pool listings, details, charts, LP positions, IL simulation
Swap/api/swapSwap quotes, optimal multi-hop routing
Portfolio/api/portfolio, /api/historyWallet portfolio aggregation, swap history
AI Endpoints/api/ai, /api/safety, /api/entry-signal, /api/autopilotAI chat, token/pool analysis, anti-rug checks, entry signals, autopilot
Staking/api/stakingQSN staking info, staking pools, user positions
Launchpad/api/launchpadToken sales, contributions
Alerts/api/alertsPrice alert creation and management
Orders/api/ordersLimit order placement and tracking
Batch/api/batchBatched multi-call requests