Flashbots Protect API

Find a transaction:




Documentation

Example link: https://protect.flashbots.net/tx/0x4f5fe83892501fcd294579e267b03d98394ac543263762bba0393dd574726623

Possible statuses

UNKNOWN not received
PENDING was received, is currently sent to miners (for 25 blocks)
INCLUDED was mined
FAILED was received, but was not mined and has expired (after 25 blocks)
CANCELLED received, cancelled by user and hasn't been included in the next 2 blocks

The transaction fields are only shared for INCLUDED transactions to respect pre- and failed- trade privacy. These fields will be empty for PENDING, FAILED, UNKNOWN, or CANCELLED transactions.

Example Response

{
    "status": "PENDING",
    "hash": "0x4f5fe83892501fcd294579e267b03d98394ac543263762bba0393dd574726623",
    "maxBlockNumber": 13543898,
    "transaction": {
        "from": "",
        "to": "",
        "gasLimit": "",
        "maxFeePerGas": "",
        "maxPriorityFeePerGas": "",
        "nonce": "",
        "value": ""
    },
    "fastMode": false,
    "seenInMempool": false
}

Investigating failed transactions

If a transaction failed (not included after 25 blocks) and it had a simulation error, there will be an additional `simError` field in the payload:

{
    "status": "FAILED",
    "hash": "0x4f5fe83892501fcd294579e267b03d98394ac543263762bba0393dd574726623",
    "maxBlockNumber": 13543898,
    "transaction": {
        "from": "",
        "to": "",
        "gasLimit": "",
        "maxFeePerGas": "",
        "maxPriorityFeePerGas": "",
        "nonce": "",
        "value": ""
    },
    "fastMode": false,
    "seenInMempool": false,
    "simError": "MaxFeePerGasTooLow"
}

Possible simError values: MaxFeePerGasTooLow, NonceTooHigh, NonceTooLow, InsufficientFunds, Other