We're now supporting Polygon zkEVM!
Learn more here.

Contents

eth_sendPrivateTransaction RPC Method

Please note that this RPC method requires the Flashbots Protect add-on enabled on your QuickNode endpoint. Also, it is supported only supported on Ethereum mainnet.

Parameters:

  1. tx - string - The raw signed transaction
  2. maxBlockNumber - string - (optional) The highest block number encoded in hexadecimal value in which the transaction should be included
  3. preferences - object - (optional) The preferences object
  4. fast - boolean - It sends the transaction with fast mode when true

Returns:

  1. result - It is true if the transaction is successfully canceled, otherwise false

Code Examples:

import requests
import json

url = "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/"

payload = json.dumps({
  "jsonrpc": "2.0",
  "method": "eth_sendPrivateTransaction",
  "params": [
    "RAW_SIGNED_TX"
  ],
  "id": 1
})
headers = {
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
Ready to get started? Create a free account