# Wallet Balance Subscription & Events

## URL


```
wss://api.sniperoo.app/wallet-updates
```

## Subscribtion Method

#### `subscribe_wallets`

Subscribe to real-time wallet SOL balance updates using your API key.

**Request:**


```javascript
{
  "apiKey": "your-api-key-here", 
  "wallets": string[];
}
```

## Wallet Balance Events

| Event | Description |
|  --- | --- |
| `subscription_status` | The status of the subscribtion emmited upon subscribing |
| `wallet_update` | Fires upon SOL change in one of the wallets |
| `subscription_error` | If there is an error with the subscribtion |
| `wallet_disconnected` | Fires if Helius disconnects a wallet from listening to real-time updates |


#### Event Data Structures

**subscription_status:**


```javascript
{
    "failed": [],
    "successful": [
        "D365U5x3RNj76rh5XtJ7d9AYV7KrdoyRkJhP1dnpnRRw",
        "55qd4sXuD9sxNuB81zt774Yu1TmCXDRgJtcERtPkQWxt",
        "4PcNtFvTk9EMM6wiuiigKyfZCXxDiMZdyRFM1e3BTVpM"
    ],
    "timestamp": 1777487157987
}
```

**wallet_update:**


```javascript
{
    "balanceLamports": "75899532", 
    "timestamp": 1777487170013,
    "walletAddress": "4PcNtFvTk9EMM6wiuiigKyfZCXxDiMZdyRFM1e3BTVpM"
}
```

**subscription_error:**


```javascript
{
    "message": string,
}
```

**wallet_disconnected:**


```javascript
{ 
    "reason": string,
    "timestamp": number, 
    "walletAddress": string 
}
```