Integration Guide
Submitting a Deterministic Bundle
import requests
from eth_account import Account
EUREKA_RPC = "https://rpc.eurekabuilder.xyz"
def send_deterministic_bundle(signed_txs: list[str], block_number: int, watched_addresses: list[str], private_key: str):
body = {
"jsonrpc": "2.0",
"method": "eth_sendDeterministicBundle",
"params": [{
"txs": signed_txs,
"blockNumber": hex(block_number),
"watchedAddresses": watched_addresses,
}],
"id": 1,
}
# Sign the payload with Flashbots-style header
message = json.dumps(body)
account = Account.from_key(private_key)
signature = account.sign_message(encode_defunct(text=message))
header_value = f"{account.address}:{signature.signature.hex()}"
response = requests.post(
EUREKA_RPC,
json=body,
headers={"X-Flashbots-Signature": header_value},
)
return response.json()
# Example: execute after a Uniswap V3 pool and an oracle are both touched
send_deterministic_bundle(
signed_txs=["0x02f8..."],
block_number=20_400_000,
watched_addresses=[
"0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640", # USDC/WETH pool
"0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419", # Chainlink ETH/USD
],
private_key=private_key,
)Choosing Watched Addresses
Replacing a Deterministic Bundle
Cancelling
Tracking Inclusion
With Refunds
Last updated
