curl --request GET \
--url https://demo-api.mobula.io/api/2/swap/quoting{
"data": {
"requestId": "<string>",
"solana": {
"transaction": {
"serialized": "<string>",
"variant": "legacy"
},
"lastValidBlockHeight": 123
},
"amountOutTokens": "<string>",
"slippagePercentage": 123,
"amountInUSD": 123,
"amountOutUSD": 123,
"marketImpactPercentage": 123,
"poolFeesPercentage": 123,
"tokenIn": {
"address": "<string>",
"decimals": 123,
"name": "<string>",
"symbol": "<string>",
"logo": "<string>"
},
"tokenOut": {
"address": "<string>",
"decimals": 123,
"name": "<string>",
"symbol": "<string>",
"logo": "<string>"
},
"details": {
"route": {
"hops": [
{
"poolAddress": "<string>",
"tokenIn": {
"address": "<string>",
"decimals": 123,
"name": "<string>",
"symbol": "<string>",
"logo": "<string>"
},
"tokenOut": {
"address": "<string>",
"decimals": 123,
"name": "<string>",
"symbol": "<string>",
"logo": "<string>"
},
"amountInTokens": "<string>",
"amountOutTokens": "<string>",
"exchange": "<string>",
"poolType": "<string>",
"feePercentage": 123,
"feeBps": 123
}
],
"totalFeePercentage": 123,
"aggregator": "<string>"
},
"aggregator": "<string>",
"raw": {}
},
"fee": {
"amount": "<string>",
"percentage": 123,
"wallet": "<string>",
"deductedFrom": "input"
},
"evm": null
},
"error": "<string>"
}Get a swap quote with optimized routing across multiple DEXs and liquidity sources. Returns estimated output amount, slippage, and a serialized transaction ready to be signed. Either amount (human-readable) or amountRaw (raw amount as string) must be provided, but not both.
curl --request GET \
--url https://demo-api.mobula.io/api/2/swap/quoting{
"data": {
"requestId": "<string>",
"solana": {
"transaction": {
"serialized": "<string>",
"variant": "legacy"
},
"lastValidBlockHeight": 123
},
"amountOutTokens": "<string>",
"slippagePercentage": 123,
"amountInUSD": 123,
"amountOutUSD": 123,
"marketImpactPercentage": 123,
"poolFeesPercentage": 123,
"tokenIn": {
"address": "<string>",
"decimals": 123,
"name": "<string>",
"symbol": "<string>",
"logo": "<string>"
},
"tokenOut": {
"address": "<string>",
"decimals": 123,
"name": "<string>",
"symbol": "<string>",
"logo": "<string>"
},
"details": {
"route": {
"hops": [
{
"poolAddress": "<string>",
"tokenIn": {
"address": "<string>",
"decimals": 123,
"name": "<string>",
"symbol": "<string>",
"logo": "<string>"
},
"tokenOut": {
"address": "<string>",
"decimals": 123,
"name": "<string>",
"symbol": "<string>",
"logo": "<string>"
},
"amountInTokens": "<string>",
"amountOutTokens": "<string>",
"exchange": "<string>",
"poolType": "<string>",
"feePercentage": 123,
"feeBps": 123
}
],
"totalFeePercentage": 123,
"aggregator": "<string>"
},
"aggregator": "<string>",
"raw": {}
},
"fee": {
"amount": "<string>",
"percentage": 123,
"wallet": "<string>",
"deductedFrom": "input"
},
"evm": null
},
"error": "<string>"
}111