Wei 2 Cool Documentation

Getting Started

Welcome to the Wei 2 Cool API documentation. Our RPC endpoint provides advanced block building capabilities with MEV optimization and bundle support.

RPC Endpoint:

https://rpc.wei2.cool

eth_sendBundle

Submit a bundle of transactions to be executed atomically in a single block.

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendBundle",
  "params": [
    {
      "txs": ["0x12...ab", "0x34...cd"],
      "blockNumber": "0x102286B",
      "revertingTxHashes": [],
      "droppingTxHashes": [],
      "replacementUuid": "abcd1234",
      "refundPercent": 90,
      "refundRecipient": "0x...",
      "refundTxHashes": []
    }
  ]
}

Parameters

txsArray[String]List of signed transactions
blockNumberString (Optional)Target block number
refundPercentNumber (Optional)Percentage of ETH reward to refund (0-99)

Response

{
  "result": {
    "bundleHash": "0x164d7d41f24b7f333af3b4a70b690cf93f636227165ea2b699fbb7eed09c46c7"
  },
  "error": null,
  "id": 1
}

eth_cancelBundle

Cancel a previously submitted bundle using its replacement UUID.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_cancelBundle",
  "params": [
    {
      "replacementUuid": "abcd1234"
    }
  ]
}

Note: Bundle cancellation cannot be guaranteed if submitted within 4 seconds of relay submission.

eth_sendRawTransaction

Send a raw signed transaction to the mempool.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendRawTransaction",
  "params": ["0x...signed_transaction_hex"]
}

eth_sendPrivateTransaction

Send a private transaction that won't be broadcast to the public mempool.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendPrivateTransaction",
  "params": [
    {
      "tx": "0x...signed_transaction_hex"
    }
  ]
}

eth_sendEndOfBlockBundle

Submit a bundle to be executed at the end of block construction, targeting specific pools.

Authentication Required: This endpoint requires the X-Flashbots-Signature header.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendEndOfBlockBundle",
  "params": [
    {
      "txs": ["0x12...ab", "0x34...cd"],
      "blockNumber": "0x102286B",
      "revertingTxHashes": [],
      "targetPools": ["0xpool1...", "0xpool2..."]
    }
  ]
}

eth_sendBlobs

Send multiple blob transaction permutations for optimal blob space utilization.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_sendBlobs",
  "params": [
    {
      "txs": [
        "0x12...ab1",  // Transaction with 1 blob
        "0x34...cd2",  // Transaction with 2 blobs
        "0x56...ef3",  // Transaction with 3 blobs
        "0x78...gh4",  // Transaction with 4 blobs
        "0x9a...ij5",  // Transaction with 5 blobs
        "0xbc...kl6"   // Transaction with 6 blobs
      ],
      "maxBlockNumber": "0x102286B"
    }
  ]
}

Optimization: Send all blob permutations to ensure optimal utilization of the 6-blob per block limit.

Authentication

Some endpoints require authentication using the X-Flashbots-Signature header for enhanced security.

CURL Example

curl -s --data '{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "eth_sendBundle",
  "params": [{
    "txs": ["0x12...ab","0x34..cd"], 
    "blockNumber": "0x102286B",
    "replacementUuid": "abcd1234"
  }]
}' \
-H "Content-Type: application/json" \
-X POST https://rpc.wei2.cool