GET /tx/compute/swap-base-out

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/raydium/tx/compute/swap-base-outCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Read-only exact-output Solana swap route quote with required input amount and route plan.

Parameters

nameintypedescription
inputMintquerystrrequiredInput token mint address.
example: So11111111111111111111111111111111111111112
outputMintquerystrrequiredOutput token mint address.
example: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
amountquerystrrequiredExact desired output amount in raw units.
example: 10000000
slippageBpsqueryintrequiredMaximum slippage tolerance in basis points.
default: 50
example: 50
txVersionquerystrrequiredTransaction format version (V0 or LEGACY).
default: V0
example: V0

Response

type: object
pagination: none
sample: {
  "id": "str",
  "success": "bool",
  "version": "str",
  "data": "object"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/raydium/tx/compute/swap-base-out?inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&amount=10000000&slippageBps=50&txVersion=V0"