Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

sendTransaction - Dash

Example code for the sendTransaction WebSocket method. Complete guide on how to use the sendTransaction WebSocket method in the GetBlock Web3 documentation.

Broadcasts a signed, serialized transaction over WebSocket and returns its txid.

Parameters

Parameter
Type
Required
Description

hex

string

Yes

Signed serialized transaction hex

Message

wscat -c wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>

# then send:
{
    "id": "getblock.io",
    "method": "sendTransaction",
    "params": {
        "hex": "0300000001..."
    }
}

Response

{
    "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

Last updated

Was this helpful?