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

Documentation Index

Fetch the complete documentation index at: https://docs.raze.bot/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

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

transactionsFeeLamports
number

Priority fee per transaction in lamports

Example:

100000

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