Account balance

The account balance events stream provides updates about account balance changes

Properties

The AccountBalance entity has the following properties:

Property
Type
Description

account_hash

string(64)

Account hash

liquid_balance

uint64

Account liquid balance

staked_balance

uint64

Account staked balance

undelegating_balance

uint64

Account undelegating balance

Optional properties

None

Endpoint

GET /account-balances

Query params

Property
Type
Description

account_hash

string

Comma-separated account hashes

public_key

string

Comma-separated account public keys

Events

Event
Description

updated

Notifies about account balance updates

Response

WebSocketMessage<AccountBalance>

Example

wscat -c 'wss://streaming.testnet.cspr.cloud/account-balances?account_hashes=d38f71a113bb46e2cb7d46cd1c14427a3e077f67d8dad15e9c0bb91b7b8a82d9' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
{
  "data": {
    "account_hash": "d38f71a113bb46e2cb7d46cd1c14427a3e077f67d8dad15e9c0bb91b7b8a82d9",
    "liquid_balance": 18761763338560,
    "staked_balance": 0,
    "undelegated_balance": 0
  },
  "action": "updated",
  "extra": {
    "deploy_hash": "71d954db5263876d74d8553f92ba12d5dd2f0df8ad030b0f5aa5687d87da696e"
  },
  "timestamp": "2024-02-26T17:13:09.285952786Z"
}

Last updated