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,
    "details": {
      "aggregator": "<string>",
      "raw": {}
    }
  },
  "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