> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.to/llms.txt
> Use this file to discover all available pages before exploring further.

# Uniswap Position Updates

> Stream Uniswap V3/V4 position transfers, burns, and liquidity changes.

> [!NOTE]
>
> **Room ID:** `uniswap_position_update` \
> **Endpoint:** `wss://staging-api.struct.to/ws`

Live Uniswap V3 and V4 position updates for transfers, burns, liquidity changes, and range changes. Messages include ownership, range, liquidity, token amounts, claimable fees, and USD values. `protocol` on each update says which version produced it. Solana is not supported.

## Subscribe

Empty filters or `subscribe_all: true` receive every position update. Combined filters are capped at 500.

### Filters

| Filter | Type | Required | Description |
| - | - | - | - |
| `chain` | `string` | No\* | Chain name: `solana`, `bnb`, `base`, `ethereum`, `robinhood`, `arc` |
| `chain_id` | `integer` | No\* | Chain id: `-1`, `56`, `8453`, `1`, `4663`, `5042` |
| `pool_ids` | `string[]` | No | Uniswap V3 pool addresses or V4 pool ids |
| `owners` | `string[]` | No | Wallet addresses |
| `token_ids` | `string[]` | No | Position NFT token ids |
| `event_types` | `string[]` | No | `transferred`, `burned`, `liquidity_changed`, `range_changed` |
| `subscribe_all` | `boolean` | No | Receive every update |

Provide either `chain` or `chain_id`. Do not send both.

### Example

```json theme={null}
{
  "type": "join_room",
  "payload": {
    "room_id": "uniswap_position_update"
  }
}
```

```json theme={null}
{
  "type": "room_message",
  "payload": {
    "room_id": "uniswap_position_update",
    "message": {
      "action": "subscribe",
      "chain": "ethereum",
      "owners": [
        "0x1111111111111111111111111111111111111111"
      ]
    }
  }
}
```

## Events

The room emits `uniswap_position_update`. Pick **Response (Long)** or **Response (Short)** in the right-hand panel. WebSocket defaults to short. See [long and short field names](https://docs.struct.to/api-reference/response-format.md#long-and-short-field-names).

```json Response (Long) theme={null}
{
  "type": "uniswap_position_update",
  "room_id": "uniswap_position_update",
  "data": {
    "chain_id": 1,
    "protocol": "UniswapV4",
    "event_type": "liquidity_changed",
    "block_number": 22100000,
    "block_timestamp": 1710000000000,
    "confirmed_at": 1710000000000,
    "token_id": "42",
    "pool": "0x1111111111111111111111111111111111111111111111111111111111111111",
    "owner": "0x1111111111111111111111111111111111111111",
    "previous_owner": "0x1111111111111111111111111111111111111111",
    "from": "0x1111111111111111111111111111111111111111",
    "to": "0x1111111111111111111111111111111111111111",
    "tick_lower": -180,
    "tick_upper": 60,
    "liquidity_delta": "250000000",
    "liquidity_raw": "1250000000",
    "currency0": "0x0000000000000000000000000000000000000000",
    "currency1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "currency0_decimals": 18,
    "currency1_decimals": 6,
    "currency0_price_usd": "2474.05",
    "currency1_price_usd": "1.00",
    "amount0_raw": "1500000000000000000",
    "amount1_raw": "3700000000",
    "amount0": "1.5",
    "amount1": "3700",
    "amount0_usd": "3711.08",
    "amount1_usd": "3700",
    "amounts_usd": "7411.08",
    "claimable_fee0_raw": "1200000000000000",
    "claimable_fee1_raw": "2800000",
    "claimable_fee0": "0.0012",
    "claimable_fee1": "2.8",
    "claimable_fee0_usd": "2.97",
    "claimable_fee1_usd": "2.8",
    "claimable_fees_usd": "5.77",
    "owner_changed": false,
    "liquidity_changed": true,
    "range_changed": false
  }
}
```

```jsonc Response (Short) theme={null}
{
  "type": "uniswap_position_update",
  "room_id": "uniswap_position_update",
  "data": {
    "ci": 1,
    "pr": "UniswapV4",
    "et": "liquidity_changed",
    "bn": 22100000,
    "bts": 1710000000000,
    "ca": 1710000000000,
    "id": "42",
    "p": "0x1111111111111111111111111111111111111111111111111111111111111111",
    "o": "0x1111111111111111111111111111111111111111",
    "po": "0x1111111111111111111111111111111111111111",
    "fr": "0x1111111111111111111111111111111111111111",
    "to": "0x1111111111111111111111111111111111111111",
    "tl": -180,
    "tu": 60,
    "ld": "250000000",
    "lq": "1250000000",
    "c0": "0x0000000000000000000000000000000000000000",
    "c1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "cd0": 18,
    "cd1": 6,
    "p0": "2474.05",
    "p1": "1.00",
    "a0r": "1500000000000000000",
    "a1r": "3700000000",
    "a0": "1.5",
    "a1": "3700",
    "a0u": "3711.08",
    "a1u": "3700",
    "au": "7411.08",
    "f0r": "1200000000000000",
    "f1r": "2800000",
    "f0": "0.0012",
    "f1": "2.8",
    "f0u": "2.97",
    "f1u": "2.8",
    "fu": "5.77",
    "oc": false,
    "lc": true,
    "rc": false
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.