broadcast_tx_sync - TAC

Broadcasts a transaction and returns after CheckTx (mempool validation), without waiting for the transaction to be included in a block.

Method

broadcast_tx_sync

Parameters

ParameterTypeDescription
txstringBase64-encoded signed transaction

Example

bashexport TAC_TM=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

# JSON-RPC over HTTP (POST)
curl -X POST "${TAC_TM}" -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": "getblock.io", "method": "broadcast_tx_sync", "params": {"tx": "Cg8KQ..."}}'

# URI over HTTP (GET)
curl "${TAC_TM}broadcast_tx_sync?tx=Cg8KQ..."

Response

json{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": {
        "code": 0,
        "data": "",
        "log": "",
        "hash": "9A1B2C..."
    }
}

Response Fields

FieldTypeDescription
codenumberCheckTx result code (0 = accepted into mempool)
hashstringThe transaction hash
logstringCheckTx log or error message

Use Cases

  • Submission: Broadcast and confirm mempool acceptance
  • Fast path: Return without waiting for inclusion

Error Handling

ErrorMessageDescription
-32600 / Invalid requestInvalid requestThe JSON-RPC envelope was malformed
-32602 / Invalid paramsInvalid paramsA parameter was missing or of the wrong type
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect