Skip to main content
GET
/
2
/
swap
/
quoting-instructions
Get swap quote instructions with transaction details
curl --request GET \
  --url https://demo-api.mobula.io/api/2/swap/quoting-instructions
{
  "data": {
    "requestId": "<string>",
    "solana": {
      "instructions": {
        "swapInstructions": [
          {
            "programId": "<string>",
            "accounts": [
              {
                "pubkey": "<string>",
                "isSigner": true,
                "isWritable": true
              }
            ],
            "data": "<string>"
          }
        ],
        "computeBudgetInstructions": [
          {
            "programId": "<string>",
            "accounts": [
              {
                "pubkey": "<string>",
                "isSigner": true,
                "isWritable": true
              }
            ],
            "data": "<string>"
          }
        ],
        "setupInstructions": [
          {
            "programId": "<string>",
            "accounts": [
              {
                "pubkey": "<string>",
                "isSigner": true,
                "isWritable": true
              }
            ],
            "data": "<string>"
          }
        ],
        "cleanupInstructions": [
          {
            "programId": "<string>",
            "accounts": [
              {
                "pubkey": "<string>",
                "isSigner": true,
                "isWritable": true
              }
            ],
            "data": "<string>"
          }
        ],
        "addressLookupTableAddresses": [
          "<string>"
        ]
      },
      "lastValidBlockHeight": 123,
      "recentBlockhash": "<string>"
    },
    "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>"
    }
  },
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.mobula.io/llms.txt

Use this file to discover all available pages before exploring further.

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 sentinels — EVM: 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE (EIP-7528). Solana: So11111111111111111111111111111111111111112 (wSOL). TON: EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c.

Minimum string length: 1
tokenOut
string
required

Buy token address. Same sentinel rules as tokenIn.

Minimum string length: 1
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.

walletAddress
string
required

User wallet address — recipient of tokenOut, signer for the broadcast tx, fee context.

Minimum string length: 1
excludedProtocols

DEX-level deny list (CSV). Example: pump-amm,raydium.

onlyProtocols

DEX-level allow list (CSV). Example: uniswap-v3,uniswap-v4.

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

Caller referral fee in % (0-99). Mobula skims a 20% platform cut off the top. Requires feeWallet.

feeWallet
string

Wallet that receives the caller referral fee. Required when feePercentage > 0.

minFeesNative

Minimum caller referral fee in native-token units. Currently honored on TON native-input swaps; requires feeWallet.

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 - application/json

Swap quoting instructions response

data
object
required
error
string