MEVSwap is live - The first MEV DEX
mevswap.com
merkle
Dashboard
  • What is merkle
  • Private pool
    • What is Private mempool
    • What is MEV
      • Arbitrage
      • Backruns
      • Sandwiches
    • Wallets
      • Send transactions via RPC
      • Cancel a transaction
      • Transaction status
      • Send transactions via API
      • Programmable privacy
      • Transaction boost
      • Send Solana transaction
      • Solana Transaction Status
      • Solana Boost
    • Searchers
      • Bid on transactions
      • MEVBlocker websocket
      • Bid status
      • Send bundles
    • User Cashback
      • Implementation Guide
      • Dashboard
    • Mempool Explorer
  • MEVSwap
    • What is MEVSwap
    • MEV Bids
    • Swap Signatures
  • Pools
  • MEV Protected Free RPC
    • Ethereum RPC
    • BSC RPC
  • Snapshots
    • Ethereum RETH Snapshots
Powered by GitBook

© merkle 2023-2025

On this page

Was this helpful?

  1. Private pool
  2. Wallets

Send transactions via API

PreviousTransaction statusNextProgrammable privacy

Last updated 29 days ago

Was this helpful?

This method is for advanced users only. Your displays an RPC that accepts transactions into the private pool easily. We recommend using the unless you want to customize the lifecycle of the transaction or the auction.

To send transactions, you will need:

  • The transactions

  • An API key. Create an account on the for free and get your API key.

Once a transaction is received, Merkle will run an auction with searchers. If no bid is made, your transaction will be released to trusted builders, ensuring it remains private and secure until block inclusion.

Send a new transaction

POST https://mempool.merkle.io/transactions

Headers

Name
Type
Description

X-MBS-Key*

String

Request Body

Name
Type
Description

transactions*

String array

List of transactions to send to the private pool. Each transaction will be processed independently (not as a bundle).

privacy

String

hints

String array

bundle_types

String array

Types of bids allowed on auctions. By default, only backruns are allowed.

prevent_reverts

Bool

Prevent this transaction from reverting onchain. This transaction will not be mined if it reverts. Default: false

max_block_number

Number

The maximum block number this transaction should be broadcasted until. Afterwards the transaction will be dropped and considered "expired".

Here are examples on how to send transactions in several languages:

Javascript

const signer = {} // the ethers Signer
const tx = {} // the ethers Transaction

const signedTx = signer.signTransaction(tx)

await fetch(`https://mempool.merkle.io/transactions`, {
    method: 'POST',
    body: JSON.stringify({
        transactions: [signedTx], // Array[String], List of signed transactions 
        source: "customer-123", // (Optional) String, A source tag
        privacy: "default", // (Optional) String, The privacy profile
        hints: [], // (Optional) Array[String], List of hints, overrides the privacy profile
        bundle_types: ["backrun"], // (Optional) Array[String], List of allowed bundle types
        release_targets: ["public"], // (Optional) Array[String], Either public or private
        prevent_reverts: false, // (Optiona) Boolean, Prevent this transaction from reverting
    }),
    headers: { 
        'Content-Type': 'application/json',
        'X-MBS-Key': '' // Your api key, get it at https://mbs.merkle.io
    }
})

Go

tx := new(types.Transaction) // The types. Transaction from go-ethereum

txBytes, err := tx.MarshalBinary()

if err != nil { panic("could not serialize transaction") }

// To hex string
txHex := common.Bytes2Hex(txBytes)

// Send to the pool
type PoolSubmission struct {
    // An array of transactions
    Transactions []string `json:"transactions"`

    // Optional, a source tag
    Source string `json:"source"`
    
    // Optional, a privacy profile
    Privacy string `json:"privacy"`
    
    // Optional, a list of hints, overrides the privacy profile
    Hints []string `json:"hints"`
    
    // Optional, a list of allowed bundles for this transaction
    BundleTypes []string `json:"bundle_types"`
    
    // Optional, a list of release targets
    ReleaseTargets []string `json:"release_targets"`

    // Optional, prevent reverts
    PreventReverts bool `json:"prevent_reverts"`
}

submission := &PoolSubmission{
    Transactions: []string{txHex}, // Array[String], List of signed transactions 
    Privacy: "default", // (Optional) String, The privacy setting
    BundleTypes: []string{"backrun"}, // (Optional) Array[String], List of allowed bundle types
    ReleaseTargets: []string{"public"}, // (Optional) Array[String], Either public or private
    PreventReverts: False, // (Optional) Boolean, Prevent this transaction from reverting
}

submissionBody, err := json.Marshal(submission)

if err != nil { panic("could not serialize submission") }

// Send submission to the pool
http.Post("https://mempool.merkle.io/transactions", "application/json", bytes.NewBuffer(submissionBody) )

Merkle API key. Get one at

Privacy profile of the transaction. By default the value is default, .

If custom is passed as a privacy profile, a list of hints is required. .

dashboard
eth_sendRawTransaction RPC method
Developer Dashboard
Merkle Developers
learn more about Privacy
Learn more about hints