broadcast_tx - Cosmos

broadcast_tx. Discover how to broadcast transactions

broadcast_tx - Cosmos [Value: 20CU]
Retrieves how to broadcast transactions
Use cases

Use cases

  • Broadcast signed transaction to the network
  • Send transactions for inclusion in the blockchain
  • Ensure transaction propagation across the network
Constraints

Constraints

  • Network congestion might delay transaction processing
  • Broadcasted transactions are subject to validation
  • Incorrectly formatted transactions may result in errors
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --location 'https://cosmos-hub.drpc.org' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "2.0",
    "method": "broadcast_tx",
    "params": ["YOUR_TRANSACTION"],
    "id": 1
}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "result": {
    "code": 0,
    "data": "TX_HASH",
    "log": "Transaction successfully broadcasted",
    "hash": "TX_HASH"
  },
  "id": 1
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersstring
string
txstring
The encoded transaction to be broadcast. The transaction should be base64 encoded.

Response

200
Contains the result of the transaction broadcast

Response params

object
idinteger
jsonrpcstring
resultobject
object
codeinteger
The status code indicating the outcome of the transaction. A code of 0 typically means success.
datastring
The data associated with the transaction, often including relevant details or identifiers.
logstring
The log message providing details about the transaction's processing and outcome.
codespacestring
The codespace within which the status code is defined, indicating the module that generated the code.
hashstring
The unique hash of the transaction, serving as an identifier for the broadcast transaction.
errorobject
Details of the error, if any occurred during the transaction processing.