---
title: "Get swap quote with transaction details"
method: GET
path: "/api/2/swap/quoting"
tags: ["V2 - Swap"]
---

# Get swap quote with transaction details

`GET /api/2/swap/quoting`

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.

## Query parameters

- `chainId` string — Mobula chain id. EVM: `evm:<integer>` (e.g. `evm:1`, `evm:8453`, `evm:42161`). Solana: `solana:solana`. TON: `ton:mainnet` or `ton:testnet`.
- `tokenIn` string, required — Sell token address. Native identifiers — EVM: `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` (EIP-7528). Solana native SOL: `So11111111111111111111111111111111111111111`. Use wrapped SOL / WSOL mint `So11111111111111111111111111111111111111112` only when swapping WSOL token-account balance. TON: `EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c`.
- `tokenOut` string, required — Buy token address. Same native identifier rules as `tokenIn`.
- `amount` string — Human-readable amount (e.g. `"1.5"` for 1.5 tokens). Converted server-side: raw = amount × 10^decimals. Mutually exclusive with `amountRaw`.
- `amountRaw` string — Raw amount as a digit-only string (e.g. `"1500000"` for 1.5 USDC at 6 decimals). Use this when you already have the bigint to avoid float precision loss. Mutually exclusive with `amount`.
- `slippage` string — Slippage tolerance in % (0-100, default 1). Quote rejects if expected output drops below this threshold.
- `maxMarketImpactPercentage` union — Optional market impact guard in %. If the computed marketImpactPercentage is greater than this value, the quote is rejected with HTTP 400.
  - string
  - number
- `walletAddress` string, required — Taker wallet — supplies `tokenIn`, signs the broadcast tx, pays gas, and receives `tokenOut` unless `recipientAddress` is set. Fee context.
- `recipientAddress` string — EVM only. Address that receives `tokenOut`. Defaults to `walletAddress`. Lets the taker (who supplies `tokenIn`, signs, and pays gas) differ from the output recipientAddress — e.g. relay flows where funds land at a relayer and the swapped output is delivered to the end user.
- `sellEntireBalance` string — EVM only. When `true`, MobulaRouter v2.19.0+ sells the taker’s entire ERC20 `tokenIn` balance at execution time; `amountRaw`/`amount` is used only to select the route and calculate the minimum output. Requires a Mobula route and is refused on aggregator routes.
- `excludedProtocols` union — DEX-level deny list (CSV). Example: `pump-amm,raydium`.
  - string
  - string[]
- `onlyProtocols` union — DEX-level allow list (CSV). Example: `uniswap-v3,uniswap-v4`.
  - string
  - string[]
- `poolAddress` string — Pin routing to a single pool (e.g. when you want a specific Uniswap V3 fee tier).
- `onlyRouters` string — Aggregator filter (CSV) — `jupiter`, `kyberswap`, `lifi`, `naos`. Omit to let the API pick.
- `priorityFee` string — Solana only. `auto`, `low`, `medium`, `high`, `veryHigh`, or microLamports per CU as a number string.
- `computeUnitLimit` string — Solana only. `true` for dynamic CU limit, or a fixed integer (default 400 000).
- `jitoTipLamports` string — Solana only. Jito tip in lamports — adds a transfer to one of the Jito tip accounts for fast landing.
- `feePercentage` union — Caller referral fee in % (0-99). Mobula skims a 20% platform cut off the top. Requires `feeWallet`.
  - string
  - number
- `feeWallet` string — Wallet that receives the caller referral fee. Required when `feePercentage > 0`.
- `minFeesNative` union — Minimum caller referral fee in native-token units. Currently honored on TON native-input swaps; requires `feeWallet`.
  - string
  - number
- `feeToken` string — Solana only. Mint of a token in which to charge a flat MINIMUM fee (paired with `minFeesTokenRaw`). Charged via a separate transfer to `feeWallet`, independent of the swap route. Requires `feeWallet`.
- `minFeesTokenRaw` union — Solana only. Raw amount (smallest unit) of `feeToken` to charge as a flat minimum fee. The swap reverts if the user lacks balance.
  - string
  - number
- `payerAddress` string — Solana only. Fee abstraction — wallet that signs/pays for the tx (separate from `walletAddress`).
- `multiLander` string — Solana only. `true` returns N candidate transactions over a durable nonce — race them across landers (Jito, Nozomi, 0slot). Only one commits.
- `landerTipLamports` string — Per-lander tip when `multiLander=true`. Defaults to each lander's minimum.

## Response `200`

Swap quoting response

- SwapQuotingResponse
  - `data` union, required
    - SwapQuoteSolana
      - `amountOutTokens` string — Estimated output, human-readable.
      - `slippagePercentage` number — Echo of the request `slippage` param.
      - `amountInUSD` number — Input value in USD at quote time.
      - `amountOutUSD` number — Output value in USD at quote time.
      - `marketImpactPercentage` number — Estimated price impact at this trade size.
      - `poolFeesPercentage` number — Sum of LP fees paid across the route, in %.
      - `tokenIn` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `tokenOut` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `requestId` string, required — Unique per quote — pass to support / analytics.
      - `details` SwapDetails
        - `route` RouteDetails
          - `hops` RouteHop[], required — Ordered list of pools used (multi-hop).
            - `poolAddress` string, required — Pool / pair address used for this hop.
            - `tokenIn` TokenInfo, required
              - …
            - `tokenOut` TokenInfo, required
              - …
            - `amountInTokens` string, required — Hop input amount, human-readable.
            - `amountOutTokens` string, required — Hop output amount, human-readable.
            - `exchange` string — DEX name (e.g. `Uniswap V3`, `Raydium`, `DeDust`).
            - `poolType` string — Pool type within the DEX (e.g. `CLMM`, `v3`, `VOLATILE`).
            - `feePercentage` number — Hop LP fee in %.
            - `feeBps` number — Hop LP fee in basis points.
          - `totalFeePercentage` number — Sum of LP fees across the route, in %.
          - `aggregator` string — Aggregator that picked the route.
        - `aggregator` string
        - `raw` object — Aggregator-specific raw payload (provided for debugging — schema may vary).
      - `fee` IntegrationFee — Echoed when `feePercentage` and `feeWallet` were provided in the request.
        - `amount` string, required — Fee amount in human-readable format.
        - `percentage` number, required — Fee percentage applied (0.01 to 99).
        - `wallet` string, required — Wallet address receiving the fee.
        - `deductedFrom` 'input' | 'output', required — `input` for native-in swaps, `output` for native-out swaps.
      - `solana` SolanaCalldata, required
        - `transaction` SolanaTransaction, required
          - `serialized` string, required — Base64-encoded serialized Solana transaction (typically a VersionedTransaction).
          - `variant` 'legacy' | 'versioned', required — Transaction variant — almost always `versioned` in production.
        - `lastValidBlockHeight` number, required — Blockhash expiry — broadcast before the chain ticks past this slot.
      - `evm` unknown
      - `ton` unknown
    - SwapQuoteEVM
      - `amountOutTokens` string — Estimated output, human-readable.
      - `slippagePercentage` number — Echo of the request `slippage` param.
      - `amountInUSD` number — Input value in USD at quote time.
      - `amountOutUSD` number — Output value in USD at quote time.
      - `marketImpactPercentage` number — Estimated price impact at this trade size.
      - `poolFeesPercentage` number — Sum of LP fees paid across the route, in %.
      - `tokenIn` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `tokenOut` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `requestId` string, required — Unique per quote — pass to support / analytics.
      - `details` SwapDetails
        - `route` RouteDetails
          - `hops` RouteHop[], required — Ordered list of pools used (multi-hop).
            - `poolAddress` string, required — Pool / pair address used for this hop.
            - `tokenIn` TokenInfo, required
              - …
            - `tokenOut` TokenInfo, required
              - …
            - `amountInTokens` string, required — Hop input amount, human-readable.
            - `amountOutTokens` string, required — Hop output amount, human-readable.
            - `exchange` string — DEX name (e.g. `Uniswap V3`, `Raydium`, `DeDust`).
            - `poolType` string — Pool type within the DEX (e.g. `CLMM`, `v3`, `VOLATILE`).
            - `feePercentage` number — Hop LP fee in %.
            - `feeBps` number — Hop LP fee in basis points.
          - `totalFeePercentage` number — Sum of LP fees across the route, in %.
          - `aggregator` string — Aggregator that picked the route.
        - `aggregator` string
        - `raw` object — Aggregator-specific raw payload (provided for debugging — schema may vary).
      - `fee` IntegrationFee — Echoed when `feePercentage` and `feeWallet` were provided in the request.
        - `amount` string, required — Fee amount in human-readable format.
        - `percentage` number, required — Fee percentage applied (0.01 to 99).
        - `wallet` string, required — Wallet address receiving the fee.
        - `deductedFrom` 'input' | 'output', required — `input` for native-in swaps, `output` for native-out swaps.
      - `evm` EVMCalldata, required
        - `transaction` EVMTransaction, required
          - `to` string, required — Target contract — always MobulaRouter on the chain.
          - `from` string, required — Echo of the input `walletAddress`.
          - `data` string, required — ABI-encoded calldata for MobulaRouter — pass through verbatim.
          - `value` string, required — Native token to attach, in wei. Equals `amountIn` for native-in swaps, else `0`.
          - `gasLimit` string — Suggested gas limit (wallet may simulate to refine).
          - `gasPrice` string — Legacy gas price in wei (chains without EIP-1559).
          - `maxFeePerGas` string — EIP-1559 max fee per gas in wei.
          - `maxPriorityFeePerGas` string — EIP-1559 priority fee in wei.
          - `nonce` number — Optional nonce — wallet picks if omitted.
          - `chainId` number, required — EIP-155 chain id, matches the integer suffix of the request `chainId` param.
          - `approvalAddress` string — Address to grant the ERC-20 allowance to. Defaults to `to` (MobulaRouter).
          - `approvals` EVMApproval[] — Pre-flight ERC-20 approvals to execute before the swap. Empty/absent means no approval needed.
            - `token` string, required
            - `spender` string, required
      - `solana` unknown
      - `ton` unknown
    - SwapQuoteTON
      - `amountOutTokens` string — Estimated output, human-readable.
      - `slippagePercentage` number — Echo of the request `slippage` param.
      - `amountInUSD` number — Input value in USD at quote time.
      - `amountOutUSD` number — Output value in USD at quote time.
      - `marketImpactPercentage` number — Estimated price impact at this trade size.
      - `poolFeesPercentage` number — Sum of LP fees paid across the route, in %.
      - `tokenIn` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `tokenOut` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `requestId` string, required — Unique per quote — pass to support / analytics.
      - `details` SwapDetails
        - `route` RouteDetails
          - `hops` RouteHop[], required — Ordered list of pools used (multi-hop).
            - `poolAddress` string, required — Pool / pair address used for this hop.
            - `tokenIn` TokenInfo, required
              - …
            - `tokenOut` TokenInfo, required
              - …
            - `amountInTokens` string, required — Hop input amount, human-readable.
            - `amountOutTokens` string, required — Hop output amount, human-readable.
            - `exchange` string — DEX name (e.g. `Uniswap V3`, `Raydium`, `DeDust`).
            - `poolType` string — Pool type within the DEX (e.g. `CLMM`, `v3`, `VOLATILE`).
            - `feePercentage` number — Hop LP fee in %.
            - `feeBps` number — Hop LP fee in basis points.
          - `totalFeePercentage` number — Sum of LP fees across the route, in %.
          - `aggregator` string — Aggregator that picked the route.
        - `aggregator` string
        - `raw` object — Aggregator-specific raw payload (provided for debugging — schema may vary).
      - `fee` IntegrationFee — Echoed when `feePercentage` and `feeWallet` were provided in the request.
        - `amount` string, required — Fee amount in human-readable format.
        - `percentage` number, required — Fee percentage applied (0.01 to 99).
        - `wallet` string, required — Wallet address receiving the fee.
        - `deductedFrom` 'input' | 'output', required — `input` for native-in swaps, `output` for native-out swaps.
      - `ton` TonCalldata, required
        - `transaction` TonInternalMessage, required — Primary swap message (back-compat). Always equal to `transactions[0]`.
          - `to` string, required — Recipient. Friendly `EQ…`/`UQ…` form preferred, raw `0:hex` accepted.
          - `value` string, required — Amount to attach in nanoTon (digit-only string, bigint-safe). 1 TON = 10^9 nanoTon.
          - `body` string, required — Inner message body BoC, base64. Empty string for plain transfers.
          - `bounce` boolean, required — `true` for jetton transfers (refund on failure). `false` only for trusted receive-only wallets.
          - `stateInit` string — Optional StateInit BoC base64 — set on first deploy of a recipient jetton wallet.
          - `validUntilSeconds` integer — Optional TonConnect-style ttl hint (seconds). Backend does not enforce.
        - `transactions` TonInternalMessage[], required — Full message envelope. `[0]` = swap, `[1]` = Mobula 0.1% protocol fee, `[2]` = caller referral fee. v4r2 wallet contract supports up to 4 per signature. TonConnect wallets accept this verbatim as `messages: []`.
          - `to` string, required — Recipient. Friendly `EQ…`/`UQ…` form preferred, raw `0:hex` accepted.
          - `value` string, required — Amount to attach in nanoTon (digit-only string, bigint-safe). 1 TON = 10^9 nanoTon.
          - `body` string, required — Inner message body BoC, base64. Empty string for plain transfers.
          - `bounce` boolean, required — `true` for jetton transfers (refund on failure). `false` only for trusted receive-only wallets.
          - `stateInit` string — Optional StateInit BoC base64 — set on first deploy of a recipient jetton wallet.
          - `validUntilSeconds` integer — Optional TonConnect-style ttl hint (seconds). Backend does not enforce.
        - `fees` TonFeeBreakdown, required
          - `mobulaFeeAmount` string, required — Mobula's slice (always-on protocol fee + 20% cut of the referral). nanoTon string.
          - `referralFeeAmount` string, required — Caller's net fee (referral total − Mobula's cut). 0 when no referral. nanoTon string.
          - `swapAmount` string, required — What enters the swap after both fees are deducted. `mobulaFeeAmount + referralFeeAmount + swapAmount = amountIn`. nanoTon string.
          - `mobulaFeeBps` integer, required — Mobula protocol fee in basis points. Always 10 (= 0.1%) in production.
          - `userFeeBps` integer, required — Caller-set referral fee in bps (`feePercentage × 100`). 0 when unset.
          - `platformCutBps` integer, required — Mobula's percentage cut of the referral, in bps. Always 2000 (= 20%) in production.
      - `solana` unknown
      - `evm` unknown
    - SwapQuoteSolanaMultiLander
      - `amountOutTokens` string — Estimated output, human-readable.
      - `slippagePercentage` number — Echo of the request `slippage` param.
      - `amountInUSD` number — Input value in USD at quote time.
      - `amountOutUSD` number — Output value in USD at quote time.
      - `marketImpactPercentage` number — Estimated price impact at this trade size.
      - `poolFeesPercentage` number — Sum of LP fees paid across the route, in %.
      - `tokenIn` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `tokenOut` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `requestId` string, required — Unique per quote — pass to support / analytics.
      - `details` SwapDetails
        - `route` RouteDetails
          - `hops` RouteHop[], required — Ordered list of pools used (multi-hop).
            - `poolAddress` string, required — Pool / pair address used for this hop.
            - `tokenIn` TokenInfo, required
              - …
            - `tokenOut` TokenInfo, required
              - …
            - `amountInTokens` string, required — Hop input amount, human-readable.
            - `amountOutTokens` string, required — Hop output amount, human-readable.
            - `exchange` string — DEX name (e.g. `Uniswap V3`, `Raydium`, `DeDust`).
            - `poolType` string — Pool type within the DEX (e.g. `CLMM`, `v3`, `VOLATILE`).
            - `feePercentage` number — Hop LP fee in %.
            - `feeBps` number — Hop LP fee in basis points.
          - `totalFeePercentage` number — Sum of LP fees across the route, in %.
          - `aggregator` string — Aggregator that picked the route.
        - `aggregator` string
        - `raw` object — Aggregator-specific raw payload (provided for debugging — schema may vary).
      - `fee` IntegrationFee — Echoed when `feePercentage` and `feeWallet` were provided in the request.
        - `amount` string, required — Fee amount in human-readable format.
        - `percentage` number, required — Fee percentage applied (0.01 to 99).
        - `wallet` string, required — Wallet address receiving the fee.
        - `deductedFrom` 'input' | 'output', required — `input` for native-in swaps, `output` for native-out swaps.
      - `candidates` SwapQuoteCandidate[], required — Multi-lander candidate transactions (Solana only). Sign every candidate, broadcast all of them in batch — only one will land.
        - `lander` string, required — Lander id — `jito`, `nozomi`, `zeroslot`, …
        - `serialized` string, required — Base64-encoded serialized VersionedTransaction (unsigned).
        - `tipAccount` string, required — Tip account used for this candidate.
        - `tipLamports` number, required — Tip amount in lamports.
      - `nonceAccount` string, required — Durable nonce account public key.
      - `nonceAuthority` string, required — Nonce authority public key (must co-sign).
      - `solana` unknown
      - `evm` unknown
      - `ton` unknown
    - SwapQuoteError
      - `amountOutTokens` string — Estimated output, human-readable.
      - `slippagePercentage` number — Echo of the request `slippage` param.
      - `amountInUSD` number — Input value in USD at quote time.
      - `amountOutUSD` number — Output value in USD at quote time.
      - `marketImpactPercentage` number — Estimated price impact at this trade size.
      - `poolFeesPercentage` number — Sum of LP fees paid across the route, in %.
      - `tokenIn` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `tokenOut` TokenInfo
        - `address` string, required — Token contract address (chain-specific format).
        - `name` string
        - `symbol` string
        - `decimals` number, required
        - `logo` string, nullable — Logo URL (null when unavailable).
      - `requestId` string, required — Unique per quote — pass to support / analytics.
      - `details` SwapDetails
        - `route` RouteDetails
          - `hops` RouteHop[], required — Ordered list of pools used (multi-hop).
            - `poolAddress` string, required — Pool / pair address used for this hop.
            - `tokenIn` TokenInfo, required
              - …
            - `tokenOut` TokenInfo, required
              - …
            - `amountInTokens` string, required — Hop input amount, human-readable.
            - `amountOutTokens` string, required — Hop output amount, human-readable.
            - `exchange` string — DEX name (e.g. `Uniswap V3`, `Raydium`, `DeDust`).
            - `poolType` string — Pool type within the DEX (e.g. `CLMM`, `v3`, `VOLATILE`).
            - `feePercentage` number — Hop LP fee in %.
            - `feeBps` number — Hop LP fee in basis points.
          - `totalFeePercentage` number — Sum of LP fees across the route, in %.
          - `aggregator` string — Aggregator that picked the route.
        - `aggregator` string
        - `raw` object — Aggregator-specific raw payload (provided for debugging — schema may vary).
      - `fee` IntegrationFee — Echoed when `feePercentage` and `feeWallet` were provided in the request.
        - `amount` string, required — Fee amount in human-readable format.
        - `percentage` number, required — Fee percentage applied (0.01 to 99).
        - `wallet` string, required — Wallet address receiving the fee.
        - `deductedFrom` 'input' | 'output', required — `input` for native-in swaps, `output` for native-out swaps.
      - `solana` unknown
      - `evm` unknown
      - `ton` unknown
  - `error` string — Set on routing failures (no route, slippage too tight, upstream timeout). The `data` block still carries `requestId` for support.

## Other responses

- `400` — Bad request - validation error
- `402` — Payment Required
- `500` — Internal server error

---

[API](https://skmtc.net/mobula/apis/mobula-api.md) · [All operations](https://skmtc.net/mobula/apis/mobula-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mobula/mobula-api/versions/32f95d9e8ff2/schema)
