subscribeAddresses - Dash

Subscribes to activity on a set of addresses over WebSocket. When a transaction touches any subscribed address, the server pushes the address and the transaction. Ideal for payment detection.

This is a WebSocket subscription. After the initial acknowledgement, the server pushes notifications until you unsubscribe or disconnect.

Parameters

ParameterTypeRequiredDescription
addressesarrayYesArray of Dash addresses to watch

Message

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

# then send:
{
    "id": "getblock.io",
    "method": "subscribeAddresses",
    "params": {
        "addresses": [
            "XjszN1jZJthEoaQDhGthRkaHL9AqaG3Vzw"
        ]
    }
}

Response

json{
    "id": "getblock.io",
    "data": {
        "subscribed": true
    }
}

Notifications

While subscribed, the server pushes messages of the form:

json{
    "id": "getblock.io",
    "data": {
        "address": "XjszN1jZJthEoaQDhGthRkaHL9AqaG3Vzw",
        "tx": {
            "txid": "eb0351c64cde2c42bcdf10b11a1ad44bb63631bb6487de70e78b90c2aa57137c",
            "value": "150000000"
        }
    }
}

Response Fields

FieldTypeDescription
subscribedbooleanConfirms the subscription is active
addressstringAddress that received activity (in notifications)
txobjectThe transaction touching the address (in notifications)

Use Cases

  • Payment Detection: Get notified the instant a deposit arrives
  • Wallet UX: Update balances on incoming transactions
  • Monitoring: Watch hot wallets in real time

Error Handling

ErrorMessageDescription
errorInvalid addressOne of the addresses is invalid
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect