Router Endpoints
Router Endpoints
MagicSwap’s Router exposes several high-performance endpoints used for quoting and executing token swaps on Solana. All routes are accessible via your provided base URL:
https://{region}.router.magicswap.pro/api/v1
Supported Endpoints
-
GET /info/providers
Returns supported liquidity providers. URL:https://frankfurt.router.magicswap.pro/api/v1/info/providers -
POST /info/mint
Gets metadata for token mints. URL:https://frankfurt.router.magicswap.pro/api/v1/info/mint -
POST /info/pools
Lists eligible pools for a given pair. URL:https://frankfurt.router.magicswap.pro/api/v1/info/pools -
POST /quote/best
Returns the best price for a token pair. URL:https://frankfurt.router.magicswap.pro/api/v1/quote/best -
POST /quote/custom
Shows all available routes with optional filters. URL:https://frankfurt.router.magicswap.pro/api/v1/quote/custom -
POST /swap/best
Builds a transaction from the best route. URL:https://frankfurt.router.magicswap.pro/api/v1/swap/best -
POST /swap/custom
Builds a transaction with a specific provider or pool. URL:https://frankfurt.router.magicswap.pro/api/v1/swap/custom
Notes
- All endpoints require an API key passed as a header using
x-api-key - Only
POSTrequests are supported unless otherwise specified - Use Solana mint addresses as identifiers (e.g.
So11111111111111111111111111111111111111112) - Response format is always JSON
Updated 3 months ago
