Chuyển đến nội dung chính
GET
/
compute
/
swap-base-out
Tính báo giá swap (đầu ra cơ sở)
curl --request GET \
  --url https://transaction-v1.raydium.io/compute/swap-base-out
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "success": true,
  "version": "V1",
  "data": {
    "inputAmount": "<string>",
    "outputAmount": "<string>",
    "priceImpact": "<string>",
    "routes": [
      {}
    ]
  }
}

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.

Tham số truy vấn

inputMint
string
bắt buộc

Địa chỉ mint của token đầu vào.

outputMint
string
bắt buộc

Địa chỉ mint của token đầu ra.

amount
string
bắt buộc

Lượng đầu ra mong muốn tính bằng đơn vị nhỏ nhất (lamports).

slippageBps
string
bắt buộc

Dung sai slippage tối đa tính bằng basis points (0–10000).

txVersion
enum<string>
bắt buộc

Phiên bản giao dịch Solana.

Tùy chọn có sẵn:
V0,
LEGACY

Phản hồi

Báo giá swap được tính toán thành công.

id
string

Mã định danh yêu cầu duy nhất (UUID).

Ví dụ:

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

success
boolean

Liệu tính toán có thành công hay không.

Ví dụ:

true

version
string

Phiên bản phản hồi API.

Ví dụ:

"V1"

data
object

Kết quả tính toán swap.