Skip to main content
The Network Broadcast API allows you to broadcast signed transactions to the Hive blockchain. Use this API to submit transactions after they have been properly signed with the required authorities.

broadcast_transaction

Broadcast a signed transaction to the network.

Parameters

ApiTransaction
required
The signed transaction to broadcast
number
required
Maximum block age in seconds. Use -1 to disable the check.

Response

This endpoint returns an empty response on success. If the transaction is invalid or cannot be broadcast, an error will be thrown.

Transaction lifecycle

Before broadcasting a transaction, follow these steps:

1. Create transaction with TaPoS

Transactions require TaPoS (Transaction as Proof of Stake) data for security:

2. Add operations

Push one or more operations to the transaction:

3. Sign transaction

Sign with the required authority (posting, active, or owner):

4. Broadcast

Broadcast the signed transaction to the network:

Error handling

Handle common broadcasting errors:

Common errors

  • Transaction expired: The transaction expiration time has passed. Create a new transaction with fresh TaPoS data.
  • Missing authority: The transaction is not signed with the required authority (posting, active, or owner).
  • Duplicate transaction: A transaction with the same operations and expiration already exists in the blockchain.
  • Insufficient RC: The account doesn’t have enough Resource Credits to execute the operations.
  • Invalid signature: The signature doesn’t match the transaction or public key.