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>"
}

Query Parameters

chainId
string

Blockchain chain ID (e.g., "evm:56", "solana:solana")

tokenIn
string
required

Input token address

Minimum string length: 1
tokenOut
string
required

Output token address

Minimum string length: 1
amount
string

Human-readable amount (e.g., "1.5")

amountRaw
string

Raw amount as string (e.g., "1500000")

slippage
string

Slippage tolerance percentage (0-100, default: 1)

walletAddress
string
required

Wallet address for the swap

Minimum string length: 1
excludedProtocols
onlyProtocols
poolAddress
string
onlyRouters
string
priorityFee
string
computeUnitLimit
string
jitoTipLamports
string
feePercentage
feeWallet
string
payerAddress
string
multiLander
string
landerTipLamports
string

Response

Swap quoting response

data
object
required
error
string