跳转到主要内容
提交最多 5 个已完整签名交易的捆绑包以进行原子执行。所有交易按顺序执行——如果任何一个失败,整个捆绑包将被拒绝。 需要在至少一个交易中提供给 Jito 小费账户 的小费。

Endpoint

POST https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY

Request

jsonrpc
string
必填
"2.0"
id
number
必填
请求标识符。
method
string
必填
"sendBundle"
params[0]
array[string]
必填
最多 5 个已完整签名交易的数组,base64 编码。
params[1].encoding
string
"base64"(推荐)或 "base58"。默认值:"base58"

Headers

jito-region
string
可选。路由到特定的 Jito Block Engine 地区。值:ams, dub, fra, lon, nyc, slc, sgp, tyo, mainnet。如果省略,则路由到全局端点(根据地理位置路由到最近的)。

Request Example

curl "https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "jito-region: nyc" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "sendBundle",
    "params": [
      [
        "BASE64_SIGNED_TX_1",
        "BASE64_SIGNED_TX_2"
      ],
      {
        "encoding": "base64"
      }
    ]
  }'

Response

result
string
捆绑包 ID(交易签名的 SHA-256 哈希)。与 getBundleStatuses 一起使用以跟踪着陆。
{
  "jsonrpc": "2.0",
  "result": "892b79ed49138bfb3aa5441f0df6e06ef34f9ee8f3976c15b323605bae0cf51d",
  "id": 1
}

See Also