sendrawtransaction RPC Method
Parameters
hexstring
string
REQUIRED
Loading...
maxfeerate
numeric/string
Loading...
Returns
hex
Loading...
Request
curl https://docs-demo.btc.quiknode.pro/ \
-X POST \
-H "Content-Type: application/json" \
--data '{"id": 1, "jsonrpc": "2.0", "method": "sendrawtransaction", "params": ["hexstring"]}'
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"id": 1,
"jsonrpc": "2.0",
"method": "sendrawtransaction",
"params": [
"hexstring"
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://docs-demo.btc.quiknode.pro/", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));import requests
import json
url = "https://docs-demo.btc.quiknode.pro/"
payload = json.dumps({
"id": 1,
"jsonrpc": "2.0",
"method": "sendrawtransaction",
"params": [
"hexstring"
]
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "json"
require "net/http"
url = URI("https://docs-demo.btc.quiknode.pro/")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"id": 1,
"jsonrpc": "2.0",
"method": "sendrawtransaction",
"params": [
"hexstring"
]
})
response = https.request(request)
puts response.read_body
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "2a0d5969e0d597afad5b42377738206912af0d0a43e501586193f267dae80f25"
}Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free