Skip to main content
POST
/
swap
/
sol
/
instructions
curl --request POST \
  --url https://de.raze.sh/swap/sol/instructions \
  --header 'Content-Type: application/json' \
  --data '
{
  "wallet": "62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm",
  "inputMint": "So11111111111111111111111111111111111111112",
  "outputMint": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
  "amount": 1000000000,
  "swapMode": "exactIn",
  "slippageBps": 500,
  "feeTipLamports": 1000000
}
'
{
  "success": true,
  "instructions": [
    {
      "programId": "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8",
      "data": "AQAAAA...",
      "accounts": [
        {
          "pubkey": "62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm",
          "isSigner": true,
          "isWritable": true
        }
      ]
    }
  ],
  "addressLookupTableAddresses": [
    "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
  ]
}

Headers

X-API-Key
string

Body

application/json
wallet
string
required

Payer wallet public key

Example:

"62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm"

inputMint
string
required

Input token mint address

Example:

"So11111111111111111111111111111111111111112"

outputMint
string
required

Output token mint address

Example:

"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"

amount
integer
required

Amount in input token base units (lamports for SOL)

Example:

1000000000

swapMode
enum<string>
default:exactIn

Swap mode — exactIn or exactOut

Available options:
exactIn,
exactOut
slippageBps
integer
default:500
Required range: 0 <= x <= 10000
Example:

500

tipWallet
string

Wallet to receive tip (auth only)

tipLamports
number

Tip amount in lamports (auth only)

Example:

5000

feeWallet
string

Wallet to receive fee (auth only)

feeBps
number

Fee in basis points (auth only)

Example:

50

feeTipLamports
number

Public shorthand for tip + fee

Example:

1000000

Response

Swap instructions generated

success
boolean
required
Example:

true

instructions
object[]
required

Raw swap instructions to include in your own transaction

addressLookupTableAddresses
string[]

Address Lookup Table addresses needed for the transaction