POST
/
swap-instructions
Returns an imperative swap transaction for the given quote
curl --request POST \
  --url https://quote-api.dflow.net/swap-instructions \
  --header 'Content-Type: application/json' \
  --data '{
  "computeUnitPriceMicroLamports": 1,
  "createFeeAccount": {
    "referralAccount": "<string>"
  },
  "destinationTokenAccount": {
    "associatedTokenAccount": {
      "owner": "<string>"
    }
  },
  "dynamicComputeUnitLimit": true,
  "feeAccount": "<string>",
  "positiveSlippage": {
    "feeAccount": "<string>",
    "limitPct": 1
  },
  "prioritizationFeeLamports": {
    "autoMultiplier": 1
  },
  "quoteResponse": {
    "contextSlot": 1,
    "inAmount": "<string>",
    "inputMint": "<string>",
    "minOutAmount": "<string>",
    "otherAmountThreshold": "<string>",
    "outAmount": "<string>",
    "outputMint": "<string>",
    "platformFee": null,
    "priceImpactPct": "<string>",
    "routePlan": [
      {
        "candidates": [
          {
            "marketKey": "<string>",
            "venue": "<string>"
          }
        ],
        "inAmount": "<string>",
        "inputMint": "<string>",
        "inputMintDecimals": 1,
        "marketKey": "<string>",
        "outAmount": "<string>",
        "outputMint": "<string>",
        "outputMintDecimals": 1,
        "venue": "<string>"
      }
    ],
    "simulatedComputeUnits": 1,
    "slippageBps": 1
  },
  "sponsor": "<string>",
  "userPublicKey": "<string>",
  "wrapAndUnwrapSol": true
}'
{
  "addressLookupTableAddresses": [
    "<string>"
  ],
  "blockhashWithMetadata": {
    "blockhash": "<string>",
    "lastValidBlockHeight": 1
  },
  "cleanupInstructions": [
    {
      "accounts": [
        {
          "isSigner": true,
          "isWritable": true,
          "pubkey": "<string>"
        }
      ],
      "data": "<string>",
      "programId": "<string>"
    }
  ],
  "computeBudgetInstructions": [
    {
      "accounts": [
        {
          "isSigner": true,
          "isWritable": true,
          "pubkey": "<string>"
        }
      ],
      "data": "<string>",
      "programId": "<string>"
    }
  ],
  "computeUnitLimit": 1,
  "otherInstructions": [
    {
      "accounts": [
        {
          "isSigner": true,
          "isWritable": true,
          "pubkey": "<string>"
        }
      ],
      "data": "<string>",
      "programId": "<string>"
    }
  ],
  "prioritizationFeeLamports": 1,
  "prioritizationType": null,
  "setupInstructions": [
    {
      "accounts": [
        {
          "isSigner": true,
          "isWritable": true,
          "pubkey": "<string>"
        }
      ],
      "data": "<string>",
      "programId": "<string>"
    }
  ],
  "swapInstruction": {
    "accounts": [
      {
        "isSigner": true,
        "isWritable": true,
        "pubkey": "<string>"
      }
    ],
    "data": "<string>",
    "programId": "<string>"
  }
}

Body

application/json

Response

Imperative swap transaction

The response is of type object.