API keys and authentication
API keys are optional. You can submit transactions without an API key. Providing one enables rate tracking, transaction history, and the stake-scaled rate limit on your key.
Without API Key
javascript
const response = await fetch("https://fra.fastrelay.sh/v1/sendTx", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
tx: "BASE64_ENCODED_TRANSACTION",
simulate: false
})
});With API Key (Header)
javascript
const response = await fetch("https://fra.fastrelay.sh/v1/sendTx", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
},
body: JSON.stringify({
tx: "BASE64_ENCODED_TRANSACTION",
simulate: false
})
});With API Key (Query Parameter)
javascript
const response = await fetch("https://fra.fastrelay.sh/v1/sendTx?api-key=YOUR_API_KEY", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
tx: "BASE64_ENCODED_TRANSACTION",
simulate: false
})
});