Integrate
MEV Protect API.
A server-to-server path for platforms that send transactions from their own backend: one base URL per chain, one key for all of them.
Endpoint
One base URL per chain, with the chain's id in the path. The same key works on every chain your account sends on.
- https://api.mevlabs.xyz/v1/bsc
- https://api.mevlabs.xyz/v1/arbitrum
- https://api.mevlabs.xyz/v1/base
- https://api.mevlabs.xyz/v1/robinhood
- https://api.mevlabs.xyz/v1/arc
- https://api.mevlabs.xyz/v1/elysium
Authentication
Send your key as a bearer token on every request. Keep it on your server; it must not ship in a client. Every error has the same shape (see Errors).
Submit a transaction
Post a signed transaction to the chain it is for. The answer is its hash, or an error. Sending the same transaction again returns the same hash: nothing is sent twice.
- The signed transaction, hex encoded. It is executed exactly as signed. A transaction signed for another chain than the URL's is refused with
chain_mismatch.
Read a transaction
Ask for a transaction by its hash, on the chain it was sent on. The answer is a transaction object.
List transactions
The transactions sent with your keys on one chain, newest first, a page at a time. Pass the cursor of a page to get the next one.
- Optional. One of the statuses.
- Optional. The id of one of your keys.
- Optional. Only transactions submitted at or after this time, as a Unix timestamp in milliseconds.
- Optional. Up to 100; 50 when left out.
- Optional. The
nextCursorof the page before. A page with nonextCursoris the last.
Revert protection
On chains with revert protection, a key can keep transactions that would revert out of the block, so no gas is paid for them. It is off until you turn it on for the key in the dashboard. The submit answers the same either way; such a transaction ends as dropped.
WebSocket
One connection per chain. Each submit is answered with the hash or an error, as over HTTPS. To follow what happens to a transaction, read it over HTTPS or receive webhooks. Send your key in the Authorization header when you open the connection.
- Any number you choose. The reply to a message carries the same id.
- The transaction's hash. When the submit is refused,
errorcomes back in its place, in the same shape as over HTTPS.