Broadcasts a signed, serialized transaction over WebSocket and returns its txid.
Parameters
| Parameter | Type | Required | Description |
|---|
| hex | string | Yes | Signed serialized transaction hex |
Message
bashwscat -c wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>
# then send:
{
"id": "getblock.io",
"method": "sendTransaction",
"params": {
"hex": "0300000001..."
}
}
Response
json{
"id": "getblock.io",
"data": {
"result": "eb0351c64cde2c42bcdf10b11a1ad44bb63631bb6487de70e78b90c2aa57137c"
}
}
Response Fields
| Field | Type | Description |
|---|
| result | string | Transaction id of the broadcast transaction |
Use Cases
- Transaction Submission: Broadcast over a live WS connection
- Wallet Backends: Submit and then subscribe for confirmation
- Low Latency: Send without opening a new HTTP request
Error Handling
| Error | Message | Description |
|---|
| error | Invalid transaction | The transaction failed validation |
| 403 / RBAC: access denied | Access denied | The GetBlock access token is missing or incorrect |