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>",
      "deductedFrom": "input"
    }
  },
  "error": "<string>"
}

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

200 - application/json

Swap quoting instructions response

data
object
required
error
string