Skip to main content

/cosmos/tx/v1beta1/txs REST API Endpoint

BroadcastTx broadcast transaction.

Updated on
May 9, 2024

/cosmos/tx/v1beta1/txs REST API Endpoint

Body Parameters

tx_bytes
string
REQUIRED
The raw transaction in a serialized byte format
mode
string
REQUIRED
The broadcast mode. The default mode is 'BROADCAST_MODE_UNSPECIFIED'. Enum options include 'BROADCAST_MODE_UNSPECIFIED', 'BROADCAST_MODE_BLOCK', 'BROADCAST_MODE_SYNC', 'BROADCAST_MODE_ASYNC'

Returns

params
object
The params object which contains the following fields:
tx_response
object
The tx_response object which contains the following fields:
height
string
The height of the block in which the transaction was included
txhash
string
The transaction hash
codespace
string
A namespace for the error code
code
integer
Response code
data
string
Data related to the transaction
raw_log
string
The output of the application's logger (raw string)
logs
array
An array of logs
msg_index
integer
Index of the message in the transaction
log
string
The log of the message execution
events
array
An array of events that were emitted during some execution
type
string
Type of the event
attributes
array
An array of attributes
key
string
Attribute key which describes the type of information the value holds
value
string
Attribute value associated with the corresponding key
info
string
Additional information
gas_wanted
string
Amount of gas requested for transaction
gas_used
string
Amount of gas consumed by transaction
tx
object
The tx object which contains the following fields:
type_url
string
A URL/resource name that uniquely identifies the type of the serialized protocol buffer message
value
string
A valid serialized protocol buffer of the above specified type
timestamp
string
Time of the previous block. For heights > 1, it's the weighted median of the timestamps of the valid votes in the block.LastCommit. For height == 1, it's genesis time.
Request
1
curl --location 'https://docs-demo.sei-pacific.quiknode.pro/cosmos/tx/v1beta1/txs' \
2
--header 'Content-Type: application/json' \
3
--data '{
4
"tx_bytes": "TX_BYTES",
5
"mode": "BROADCAST_MODE_UNSPECIFIED"
6
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free