SendBid
curl --request POST \
--url https://api.example.com/v1/bidder/bid \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1000000000000000000",
"block_number": 123456,
"decay_end_timestamp": 1630000000,
"decay_start_timestamp": 1630000000,
"reverting_tx_hashes": [
"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7"
],
"slash_amount": "500000000000000000",
"tx_hashes": [
"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7",
"71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8"
]
}
'import requests
url = "https://api.example.com/v1/bidder/bid"
payload = {
"amount": "1000000000000000000",
"block_number": 123456,
"decay_end_timestamp": 1630000000,
"decay_start_timestamp": 1630000000,
"reverting_tx_hashes": ["fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7"],
"slash_amount": "500000000000000000",
"tx_hashes": ["fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7", "71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '1000000000000000000',
block_number: 123456,
decay_end_timestamp: 1630000000,
decay_start_timestamp: 1630000000,
reverting_tx_hashes: ['fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7'],
slash_amount: '500000000000000000',
tx_hashes: [
'fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7',
'71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8'
]
})
};
fetch('https://api.example.com/v1/bidder/bid', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/bidder/bid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '1000000000000000000',
'block_number' => 123456,
'decay_end_timestamp' => 1630000000,
'decay_start_timestamp' => 1630000000,
'reverting_tx_hashes' => [
'fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7'
],
'slash_amount' => '500000000000000000',
'tx_hashes' => [
'fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7',
'71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/bidder/bid"
payload := strings.NewReader("{\n \"amount\": \"1000000000000000000\",\n \"block_number\": 123456,\n \"decay_end_timestamp\": 1630000000,\n \"decay_start_timestamp\": 1630000000,\n \"reverting_tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\"\n ],\n \"slash_amount\": \"500000000000000000\",\n \"tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\",\n \"71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/bidder/bid")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1000000000000000000\",\n \"block_number\": 123456,\n \"decay_end_timestamp\": 1630000000,\n \"decay_start_timestamp\": 1630000000,\n \"reverting_tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\"\n ],\n \"slash_amount\": \"500000000000000000\",\n \"tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\",\n \"71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/bidder/bid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"1000000000000000000\",\n \"block_number\": 123456,\n \"decay_end_timestamp\": 1630000000,\n \"decay_start_timestamp\": 1630000000,\n \"reverting_tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\"\n ],\n \"slash_amount\": \"500000000000000000\",\n \"tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\",\n \"71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"result": {
"txHashes": [
"<string>"
],
"bidAmount": "<string>",
"blockNumber": "<string>",
"receivedBidDigest": "<string>",
"receivedBidSignature": "<string>",
"commitmentDigest": "<string>",
"commitmentSignature": "<string>",
"providerAddress": "<string>",
"decayStartTimestamp": "<string>",
"decayEndTimestamp": "<string>",
"dispatchTimestamp": "<string>",
"revertingTxHashes": [
"<string>"
],
"slashAmount": "<string>"
},
"error": {
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}API Reference
SendBid
Send a bid to the bidder mev-commit node. The bid is a message from the bidder to the provider with the transaction hashes and the amount of ETH that the bidder is willing to pay to the provider for including the transaction in the block. The bid also includes the block number that the bidder wants to include the transaction in, the start and end timestamps for the bid decay. The bidder can optionally include the raw transaction payloads (hex encoded RLP) instead of transaction hashes.
POST
/
v1
/
bidder
/
bid
SendBid
curl --request POST \
--url https://api.example.com/v1/bidder/bid \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1000000000000000000",
"block_number": 123456,
"decay_end_timestamp": 1630000000,
"decay_start_timestamp": 1630000000,
"reverting_tx_hashes": [
"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7"
],
"slash_amount": "500000000000000000",
"tx_hashes": [
"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7",
"71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8"
]
}
'import requests
url = "https://api.example.com/v1/bidder/bid"
payload = {
"amount": "1000000000000000000",
"block_number": 123456,
"decay_end_timestamp": 1630000000,
"decay_start_timestamp": 1630000000,
"reverting_tx_hashes": ["fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7"],
"slash_amount": "500000000000000000",
"tx_hashes": ["fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7", "71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '1000000000000000000',
block_number: 123456,
decay_end_timestamp: 1630000000,
decay_start_timestamp: 1630000000,
reverting_tx_hashes: ['fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7'],
slash_amount: '500000000000000000',
tx_hashes: [
'fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7',
'71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8'
]
})
};
fetch('https://api.example.com/v1/bidder/bid', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/bidder/bid",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '1000000000000000000',
'block_number' => 123456,
'decay_end_timestamp' => 1630000000,
'decay_start_timestamp' => 1630000000,
'reverting_tx_hashes' => [
'fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7'
],
'slash_amount' => '500000000000000000',
'tx_hashes' => [
'fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7',
'71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/bidder/bid"
payload := strings.NewReader("{\n \"amount\": \"1000000000000000000\",\n \"block_number\": 123456,\n \"decay_end_timestamp\": 1630000000,\n \"decay_start_timestamp\": 1630000000,\n \"reverting_tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\"\n ],\n \"slash_amount\": \"500000000000000000\",\n \"tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\",\n \"71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/bidder/bid")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1000000000000000000\",\n \"block_number\": 123456,\n \"decay_end_timestamp\": 1630000000,\n \"decay_start_timestamp\": 1630000000,\n \"reverting_tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\"\n ],\n \"slash_amount\": \"500000000000000000\",\n \"tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\",\n \"71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/bidder/bid")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"1000000000000000000\",\n \"block_number\": 123456,\n \"decay_end_timestamp\": 1630000000,\n \"decay_start_timestamp\": 1630000000,\n \"reverting_tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\"\n ],\n \"slash_amount\": \"500000000000000000\",\n \"tx_hashes\": [\n \"fe4cb47db3630551beedfbd02a71ecc69fd59758e2ba699606e2d5c74284ffa7\",\n \"71c1348f2d7ff7e814f9c3617983703435ea7446de420aeac488bf1de35737e8\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"result": {
"txHashes": [
"<string>"
],
"bidAmount": "<string>",
"blockNumber": "<string>",
"receivedBidDigest": "<string>",
"receivedBidSignature": "<string>",
"commitmentDigest": "<string>",
"commitmentSignature": "<string>",
"providerAddress": "<string>",
"decayStartTimestamp": "<string>",
"decayEndTimestamp": "<string>",
"dispatchTimestamp": "<string>",
"revertingTxHashes": [
"<string>"
],
"slashAmount": "<string>"
},
"error": {
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Body
application/json
Unsigned bid message from bidders to the bidder mev-commit node.
Unsigned bid message from bidders to the bidder mev-commit node.