broadcast_tx_async - Cosmos
Example code for the broadcast_tx_async JSON-RPC method. Complete guide on how to use broadcast_tx_async JSON-RPC in GetBlock Web3 documentation.
Broadcasts a signed transaction and returns immediately, without running CheckTx synchronously. The fastest broadcast method, but you get no validation feedback — track inclusion via tx_search or subscribe.
Parameters
tx
string
Yes
Base64-encoded signed transaction bytes
Request Example
# JSON-RPC over HTTP POST (canonical)
curl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/broadcast_tx_async' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "broadcast_tx_async",
"params": {
"tx": "Co0BCooBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmoKLWNvc21vczF0NnJsZ2Y4MGpkOHRhbnBubnZtbXhmcWRjbTljbjd3Y3RyczdoaxItY29zbW9zMWdoZDc1M3NoamVjajRpdjJ4Mmk4eHJrenphbnpqdnZjMjJ4MmtuGgoKBXVhdG9tEgExEnIKWg=="
},
"id": "getblock.io"
}'
# URI over HTTP GET (alternate, for simple methods)
curl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/broadcast_tx_async?tx="Co0BCooBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmoKLWNvc21vczF0NnJsZ2Y4MGpkOHRhbnBubnZtbXhmcWRjbTljbjd3Y3RyczdoaxItY29zbW9zMWdoZDc1M3NoamVjajRpdjJ4Mmk4eHJrenphbnpqdnZjMjJ4MmtuGgoKBXVhdG9tEgExEnIKWg=="'import axios from 'axios';
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "broadcast_tx_async",
"params": {
"tx": "Co0BCooBChwvY29zbW9zLmJhbmsudjFiZXRhMS5Nc2dTZW5kEmoKLWNvc21vczF0NnJsZ2Y4MGpkOHRhbnBubnZtbXhmcWRjbTljbjd3Y3RyczdoaxItY29zbW9zMWdoZDc1M3NoamVjajRpdjJ4Mmk4eHJrenphbnpqdnZjMjJ4MmtuGgoKBXVhdG9tEgExEnIKWg=="
},
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/broadcast_tx_async',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data, null, 2)))
.catch(error => console.log(error));Response Example
Response Parameters
result.hash
string
Transaction hash — does NOT indicate validity, only that the bytes were accepted by the node for relay
Use Cases
Fire-and-forget submission in high-throughput scenarios
Bulk transaction injection where individual feedback isn't needed
Error Handling
404
Not Found
Missing or invalid <ACCESS-TOKEN>
-32602
Invalid params
Request parameters are missing or malformed
-32603
Internal error
Server-side error while processing the request
429
Too Many Requests
Rate limit exceeded for your plan
SDK Integration
Last updated
Was this helpful?