Skip to main content
POST
/
swap
/
sol
/
buy
curl --request POST \
  --url https://ca.raze.sh/swap/sol/buy \
  --header 'Content-Type: application/json' \
  --data '
{
  "walletAddresses": [
    "62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm"
  ],
  "tokenAddress": "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263",
  "solAmount": 0.1
}
'
{
  "success": true,
  "transactions": [
    "4hXTCkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWJ...",
    "5mYUDkRzt9WyecNzV1XPgCDfGAZzQKNxLXgynz5QDuWJ..."
  ]
}

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.

Headers

X-API-Key
string

API key for authenticated access (alternative to Authorization header)

Authorization
string

Bearer sk_... — alternative to X-API-Key

Body

application/json
walletAddresses
string[]
required
Minimum array length: 1
Example:
[
"62ThHC1rs2GUfa8J4Qjcj5GD2MSL2d65pcJtenNieDnm"
]
tokenAddress
string
required
Example:

"DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"

solAmount
number

Uniform SOL amount per wallet. Required if amounts not provided (SOL input only).

Example:

0.1

amounts
number[]

Per-wallet SOL amounts. Required if solAmount not provided (SOL input only).

Example:
[0.05, 0.15]
inputMint
string

Input token mint. Omit for native SOL input. Use for non-SOL → token swaps.

Example:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

inputAmountRaw
integer

Raw input amount in token base units. Required when inputMint is provided.

Example:

1000000

slippageBps
integer
default:9990
Required range: 0 <= x <= 10000
Example:

9990

transactionsFeeLamports
number

Priority fee per transaction in lamports

Example:

100000

feeTipLamports
number

Tip in lamports. Public — min 0.001 SOL (1000000 lamports) enforced.

Required range: x >= 1000000
Example:

1000000

tipWallet
string

Custom tip recipient wallet (auth only)

tipLamports
number

Custom tip amount in lamports (auth only)

Example:

1000000

feeWallet
string

Custom fee recipient wallet (auth only)

feeBps
number

Custom fee in basis points (auth only)

Example:

50

encoding
enum<string>
default:base64
Available options:
base58,
base64

Response

Transactions generated

success
boolean
required
Example:

true

transactions
string[]
required

Unsigned transactions ready to be signed and submitted