π‘Aggregator API
The XOXNO Aggregator API provides optimal swap routing across multiple decentralized exchanges on MultiversX. It analyzes liquidity pools from xExchange, AshSwap, JEX, and OneDex simultaneously to find the best execution path for any trade, including split routes across multiple pools and reverse quotes.
Base URL
https://swap.xoxno.comEndpoints
/api/v1/quote
GET
Get optimal swap route and quote
/api/v1/pair-config
GET
Check pair support and token configuration
/health
GET
Service health check
Features
Multi-DEX Routing
Routes are evaluated across all supported DEXs simultaneously. The router uses a beam search over the combined liquidity graph, scoring paths multiplicatively so the best route wins regardless of which exchange holds the deepest liquidity.
Split Routing
For large trades, the optimizer automatically splits an order across multiple paths to minimize price impact and maximize output. The default split optimizer uses the hybrid algorithm (see Routing Algorithms below).
Reverse Quotes
Provide amountOut instead of amountIn to calculate exactly how much input is required to receive a specific output amount.
Arbitrage Detection
When from and to are the same token, the API finds profitable arbitrage cycles across the DEX graph. See the quote endpoint for configuration parameters.
LP Token Support
The API can route through LP token mint and burn operations, enabling single-transaction entry and exit from liquidity positions. Enable with includeLpRoutes=true.
Routing Algorithms
The algorithm parameter on the quote endpoint controls how trade amounts are allocated across paths:
greedy
Incrementally allocates chunks to the highest-rate path; early termination on declining marginal returns. ~99% optimal.
Small to medium trades where latency matters
lagrangian
Binary search on the Lagrange multiplier to equalize marginal rates across all active paths. Mathematically optimal for convex AMMs.
Large trades where output maximization is critical
hybrid
Runs both algorithms and returns whichever produces more output.
All use cases (default)
Use hybrid unless you have a specific reason to prefer one algorithm. It adds minimal latency while providing the optimality guarantees of the Lagrangian approach.
Quick Example
Response Overview
All successful responses include:
Optimal input and output amounts (raw and human-readable)
Exchange rate and estimated price impact
Minimum output amount after slippage
Detailed path breakdown (optional, controlled by
includePaths)Ready-to-use transaction data (
txData)Fee breakdown
Child Pages
Quote Endpoint β Full parameter reference, response schema, and examples
Pair Configuration β Validate token support and retrieve decimal metadata
Integration Guide β Step-by-step integration walkthrough
Error Reference β Complete error codes and resolution guidance
Last updated
Was this helpful?