跳轉到主要內容
POST
/
transaction
/
swap-base-out
構建交換交易(固定輸出)
curl --request POST \
  --url https://transaction-v1.raydium.io/transaction/swap-base-out \
  --header 'Content-Type: application/json' \
  --data '
{
  "wallet": "11111111111111111111111111111111",
  "swapResponse": {
    "id": "<string>",
    "success": true,
    "version": "<string>",
    "data": {}
  },
  "txVersion": "V0",
  "computeUnitPriceMicroLamports": "1000",
  "wrapSol": false,
  "unwrapSol": false,
  "inputAccount": "TokenAccount1111111111111111111111111111111111",
  "outputAccount": "TokenAccount2222222222222222222222222222222222",
  "jitoInfo": {
    "address": "<string>",
    "amount": "<string>"
  },
  "referrerWallet": "ReferrerWallet1111111111111111111111111111111111"
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "success": true,
  "version": "V1",
  "data": {
    "transaction": "<string>",
    "addressLookupTableAddresses": [
      "<string>"
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.raydium.io/llms.txt

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

主體

application/json
wallet
string
必填

簽署者錢包位址 (base58)。

範例:

"11111111111111111111111111111111"

swapResponse
object
必填

來自計算端點的完整回應物件。

txVersion
enum<string>
必填

Solana 交易版本。

可用選項:
V0,
LEGACY
範例:

"V0"

computeUnitPriceMicroLamports
string
必填

微 lamports 計算單位價格(用於優先費用)。

範例:

"1000"

wrapSol
boolean

如果輸入為原生 SOL,是否包裝 SOL。

範例:

false

unwrapSol
boolean

輸出是否解除包裝 WSOL 為 SOL。

範例:

false

inputAccount
string

輸入的選用代幣帳戶位址。如果不包裝 SOL 則為必填。

範例:

"TokenAccount1111111111111111111111111111111111"

outputAccount
string

輸出的選用代幣帳戶位址。

範例:

"TokenAccount2222222222222222222222222222222222"

jitoInfo
object

Jito bundle 的選用參數(用於 MEV 保護)。

referrerWallet
string

用於費用收集的選用推薦人錢包位址。

範例:

"ReferrerWallet1111111111111111111111111111111111"

回應

序列化交易構建成功。

id
string

唯一的請求識別碼。

範例:

"550e8400-e29b-41d4-a716-446655440000"

success
boolean

交易建構是否成功。

範例:

true

version
string
範例:

"V1"

data
object

交易資料。