userNonFundingLedgerEvents

Stream specific users' non funding ledger events

Subscribe

{ 
    "type": "subscribe",
    "subscription": {
        "type": "userNonFundingLedgerEvents",
        "addresses": ["0x574bafce69d9411f662a433896e74e4f153096fa"],
        "dex": "dex_name", // this is optional to filter by dex leave this field out for all events
        "addStakingEvents": bool // optional false by default
    }
} 

Unsubscribe

{ 
    "type": "unsubscribe",
    "subscription": {
        "type": "userNonFundingLedgerEvents",
        "addresses": ["0x574bafce69d9411f662a433896e74e4f153096fa"],
        "dex": "dex_name", // this is optional to filter by dex leave this field out for all events
        "addStakingEvents": bool // optional false by default
    }
}

userNonFundingLedgerEvents data format

Reconnection Note: When reconnecting with a session, replay and live events may overlap. Deduplicate using (time, txIndex, role) - skip events where this tuple is at or before your last processed event. See Session Management for details.

Each ledger event represents a balance change from a specific user's perspective. Key fields:

  • user: The primary address this event affects (always matches one of your subscribed addresses)

  • role: The user's role in the event:

    • "user" - Single-party events (deposits, withdrawals, account class transfers, liquidations)

    • "sender" - User is sending funds to another party

    • "receiver" - User is receiving funds from another party

  • counterparty: The other address involved in transfers (only present for bilateral transactions)

  • counterpartyDex: The DEX/chain of the counterparty (omitted when "hyperliquid")

Important: For transfers, you only receive the perspective where user matches your subscribed address. For example, if Alice sends funds to Bob and you're subscribed to Alice, you receive the sender perspective with Alice as user and Bob as counterparty. You do NOT receive Bob's receiver perspective unless you're also subscribed to Bob's address.

Each event contains a timestamp, hash, and delta fields describing the ledger change. Events are batched per block.

Examples

All possible ledger event types

spotTransfer

accountClassTransfer

withdraw

deposit

vaultCreate

vaultDeposit

vaultWithdraw

vaultDistribution

vaultLeaderCommission

liquidation

internalTransfer

subAccountTransfer

rewardsClaim

accountActivationGas

deployGasAuction

cStakingTransfer

spotGenesis

send

perpDexClassTransfer

activateDexAbstraction

borrowLend

borrowLendBackstopLiquidation

If addStakingEvents is true also includes

Delegation

cDeposit

cWithdrawal

Error messages:

Common errors

Last updated