API Overview
The Xplore REST API provides a comprehensive interface for cross-chain token swaps and bridge operations.
Base URLs & Environments
| Environment | Base URL | Description |
|---|---|---|
| Production | https://xplore.api.v2.routerprotocol.com | Live production API |
| Staging | https://staging-xplore.api.v2.routerprotocol.com | Pre-production testing |
| Development | http://localhost:8080 | Local development |
Interactive Documentation
Access the Swagger UI for interactive API testing:
- Production: https://xplore.api.v2.routerprotocol.com/swagger-ui/
- Development: http://localhost:8080/swagger-ui/
Key Features
- ✅ Cross-chain routing: Swap tokens across multiple blockchain networks
- ✅ Multi-bridge aggregation: Access to multiple bridge protocols (Stargate, Across, Relay, etc.)
- ✅ DEX aggregation: Best rates from multiple decentralized exchanges
- ✅ Real-time quotes: Get instant price quotes with minimal slippage
- ✅ Transaction tracking: Monitor cross-chain transaction status
- ✅ Route comparison: Compare multiple routes to find the best option
Supported Chains
The API currently supports the following blockchain networks:
- Ethereum (Chain ID: 1)
- Optimism (Chain ID: 10)
- BSC (Chain ID: 56)
- Polygon (Chain ID: 137)
- World Chain (Chain ID: 480)
- HyperEVM (Chain ID: 999)
- Base (Chain ID: 8453)
- Plasma (Chain ID: 9745)
- Arbitrum (Chain ID: 42161)
- Solana (Chain ID: solana)
Note: This list is expanding. Use the /v1/chains endpoint to get the latest list of supported chains with full metadata.
Common Patterns
Request Format
- GET requests: Query parameters in URL
- POST requests: JSON body with
Content-Type: application/json
Response Format
All successful responses return JSON with the following structure:
{
"field1": "value1",
"field2": "value2"
}
Field Naming Convention
All fields use camelCase notation:
- ✅
fromChain,toChain,fromAmount - ❌
from_chain,to_chain,from_amount
Amount Format
Amounts are represented as strings with full precision (including decimals):
{
"fromAmount": "1000000000000000000", // 1 token with 18 decimals
"toAmount": "995000000000000000" // 0.995 token with 18 decimals
}
Quick Links
- Rate Limits and API Authentication - Learn about authentication and rate limits
- Error Codes - Understand error handling
- Chains - Get supported blockchain networks
- Tokens - Get supported tokens
- Tools - Get available bridges and DEXes
- Transaction Status - Track cross-chain transactions
- Single Quote - Get the best route
- Advanced Routes - Compare multiple routes