Skip to main content
GET
/
2
/
swap
/
quoting
Get swap quote with transaction details
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>"
}
Deprecated EndpointThis endpoint is deprecated. Please use the new v2 endpoint instead:
  • /api/2/swap/quote — Get swap quotes with improved routing and multi-chain support

Query Parameters

chainId
string
required
tokenIn
string
required
Minimum string length: 1
tokenOut
string
required
Minimum string length: 1
amount
string
amountRaw
string
slippage
string
default:1
walletAddress
string
required
Minimum string length: 1
excludedProtocols
string
onlyProtocols
string
poolAddress
string
onlyRouters
string
priorityFee
string
computeUnitLimit
string
jitoTipLamports
string
feePercentage
string
feeWallet
string
payerAddress
string
multiLander
string
landerTipLamports
string

Response

Swap quoting response

data
object
required
error
string