cURL
curl -X POST https://api.relayer.fi/v1/transactions/broadcast/raw \
-H "Authorization: ApiKey $RELAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rawSignedTransaction": "0x...",
"network": "base"
}'const response = await fetch("https://api.relayer.fi/v1/transactions/broadcast/raw", {
method: "POST",
headers: {
Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ rawSignedTransaction, network: "base" }),
});
// Use this when you signed externally (MPC, HSM, browser wallet) and want
// Relayer to handle the chain submission and status tracking.import requests
url = "https://testnet.relayer.fi/v1/transactions/broadcast/raw"
payload = {
"signedTransaction": "0x...",
"chainId": 43114,
"rpcUrl": "https://api.avax.network/ext/bc/C/rpc"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
signedTransaction: '0x...',
chainId: 43114,
rpcUrl: 'https://api.avax.network/ext/bc/C/rpc'
})
};
fetch('https://testnet.relayer.fi/v1/transactions/broadcast/raw', 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://testnet.relayer.fi/v1/transactions/broadcast/raw",
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([
'signedTransaction' => '0x...',
'chainId' => 43114,
'rpcUrl' => 'https://api.avax.network/ext/bc/C/rpc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://testnet.relayer.fi/v1/transactions/broadcast/raw"
payload := strings.NewReader("{\n \"signedTransaction\": \"0x...\",\n \"chainId\": 43114,\n \"rpcUrl\": \"https://api.avax.network/ext/bc/C/rpc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://testnet.relayer.fi/v1/transactions/broadcast/raw")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"signedTransaction\": \"0x...\",\n \"chainId\": 43114,\n \"rpcUrl\": \"https://api.avax.network/ext/bc/C/rpc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/transactions/broadcast/raw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"signedTransaction\": \"0x...\",\n \"chainId\": 43114,\n \"rpcUrl\": \"https://api.avax.network/ext/bc/C/rpc\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {
"txHash": "0x789...",
"status": "broadcasted",
"broadcastedAt": "2024-01-01T12:10:00Z"
},
"path": "<string>",
"traceId": "<string>"
}Transactions
Broadcast a raw signed transaction
Broadcasts a raw signed transaction directly to the blockchain without saving it. Use this for transactions signed outside of this API.
POST
/
transactions
/
broadcast
/
raw
cURL
curl -X POST https://api.relayer.fi/v1/transactions/broadcast/raw \
-H "Authorization: ApiKey $RELAYER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"rawSignedTransaction": "0x...",
"network": "base"
}'const response = await fetch("https://api.relayer.fi/v1/transactions/broadcast/raw", {
method: "POST",
headers: {
Authorization: `ApiKey ${process.env.RELAYER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ rawSignedTransaction, network: "base" }),
});
// Use this when you signed externally (MPC, HSM, browser wallet) and want
// Relayer to handle the chain submission and status tracking.import requests
url = "https://testnet.relayer.fi/v1/transactions/broadcast/raw"
payload = {
"signedTransaction": "0x...",
"chainId": 43114,
"rpcUrl": "https://api.avax.network/ext/bc/C/rpc"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
signedTransaction: '0x...',
chainId: 43114,
rpcUrl: 'https://api.avax.network/ext/bc/C/rpc'
})
};
fetch('https://testnet.relayer.fi/v1/transactions/broadcast/raw', 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://testnet.relayer.fi/v1/transactions/broadcast/raw",
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([
'signedTransaction' => '0x...',
'chainId' => 43114,
'rpcUrl' => 'https://api.avax.network/ext/bc/C/rpc'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://testnet.relayer.fi/v1/transactions/broadcast/raw"
payload := strings.NewReader("{\n \"signedTransaction\": \"0x...\",\n \"chainId\": 43114,\n \"rpcUrl\": \"https://api.avax.network/ext/bc/C/rpc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://testnet.relayer.fi/v1/transactions/broadcast/raw")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"signedTransaction\": \"0x...\",\n \"chainId\": 43114,\n \"rpcUrl\": \"https://api.avax.network/ext/bc/C/rpc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.relayer.fi/v1/transactions/broadcast/raw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"signedTransaction\": \"0x...\",\n \"chainId\": 43114,\n \"rpcUrl\": \"https://api.avax.network/ext/bc/C/rpc\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"statusCode": 123,
"timestamp": "<string>",
"data": {
"txHash": "0x789...",
"status": "broadcasted",
"broadcastedAt": "2024-01-01T12:10:00Z"
},
"path": "<string>",
"traceId": "<string>"
}Authorizations
api-keyapi-key
Use this format: ApiKey <your_api_key>
Query Parameters
Integrator ID (required for ADMIN/INTERNAL scope)
Example:
"uuid-integrator-id"
Body
application/json
Raw transaction parameters
⌘I