> ## 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.

# Market Movement

> Follow chain volume, activity, graduation rates, and daily-average charts.

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

Select one or more chains to follow trading activity. Each chain entry includes its chain name and chain ID. The daily-average chart includes all four windows regardless of the selected timeframe.

## Subscribe

Choose one or more chains, a timeframe and an update interval.

### 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` |
| `chains` | `string[] \| string` | No | Chain names. Combined with `chain` / `chain_id` / `chain_ids` |
| `chain_ids` | `integer[] \| string` | No | Chain ids. Combined with `chain` / `chain_id` / `chains` |
| `timeframe` | `string` | No | `5m`, `1h`, `6h`, `24h`. Default 24h |
| `interval_ms` | `integer` | No | `500`, `1000`, `2500`, `5000`, `10000`. Default 500 |

Provide `chain`, `chain_id`, `chains`, and/or `chain_ids`. Selections are combined and deduplicated.

### Example

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

```json theme={null}
{
  "type": "room_message",
  "payload": {
    "room_id": "market_movement",
    "message": {
      "action": "subscribe",
      "chains": [
        "solana",
        "robinhood"
      ],
      "timeframe": "1h",
      "interval_ms": 1000
    }
  }
}
```

## Events

The room emits a full `market_movement_update` after subscribing and whenever the result changes, at the selected interval. Unchanged snapshots are not repeated. Its `data` matches the [Market Movement HTTP response](https://docs.struct.to/api-reference/token-discovery/market-movement-by-chain.md). Replace your previous data with each update. Unavailable chains are omitted; unavailable comparisons are `null`.

Each connection has one selection. Another subscription replaces it. An invalid request preserves the previous selection and reports an error. Send `action: "unsubscribe_all"` to stop. After reconnecting, join and subscribe again. Updates cost 0.002 credits per message.

```json Response (Long) theme={null}
{
  "type": "market_movement_update",
  "room_id": "market_movement",
  "interval_ms": 1000,
  "data": {
    "totals": {
      "current": {
        "volume_usd": 864000.0,
        "trades": 12960,
        "traders": 6480,
        "created": 864,
        "migrated": 216
      },
      "previous": {
        "volume_usd": 691200.0,
        "trades": 10800,
        "traders": 5400,
        "created": 648,
        "migrated": 108
      },
      "change": {
        "volume_pct": 25.0,
        "trades_pct": 20.0,
        "traders_pct": 20.0,
        "created_pct": 33.33333333333333,
        "migrated_pct": 100.0
      },
      "graduation_rate_pct": 25.0
    },
    "chains": [
      {
        "chain": "solana",
        "chain_id": -1,
        "current": {
          "volume_usd": 768000.0,
          "trades": 11520,
          "traders": 5760,
          "created": 768,
          "migrated": 192
        },
        "previous": {
          "volume_usd": 614400.0,
          "trades": 9600,
          "traders": 4800,
          "created": 576,
          "migrated": 96
        },
        "change": {
          "volume_pct": 25.0,
          "trades_pct": 20.0,
          "traders_pct": 20.0,
          "created_pct": 33.33333333333333,
          "migrated_pct": 100.0
        },
        "graduation_rate_pct": 25.0
      },
      {
        "chain": "robinhood",
        "chain_id": 4663,
        "current": {
          "volume_usd": 96000.0,
          "trades": 1440,
          "traders": 720,
          "created": 96,
          "migrated": 24
        },
        "previous": {
          "volume_usd": 76800.0,
          "trades": 1200,
          "traders": 600,
          "created": 72,
          "migrated": 12
        },
        "change": {
          "volume_pct": 25.0,
          "trades_pct": 20.0,
          "traders_pct": 20.0,
          "created_pct": 33.33333333333333,
          "migrated_pct": 100.0
        },
        "graduation_rate_pct": 25.0
      }
    ],
    "daily_average": {
      "baseline": "24h",
      "chains": [
        {
          "chain": "solana",
          "chain_id": -1,
          "points": [
            {
              "timeframe": "24h",
              "volume_usd": 11520000.0,
              "expected_volume_usd": 11520000.0,
              "multiplier": 1.0,
              "activity": "normal"
            },
            {
              "timeframe": "6h",
              "volume_usd": 3600000.0,
              "expected_volume_usd": 2880000.0,
              "multiplier": 1.25,
              "activity": "high"
            },
            {
              "timeframe": "1h",
              "volume_usd": 768000.0,
              "expected_volume_usd": 480000.0,
              "multiplier": 1.6,
              "activity": "high"
            },
            {
              "timeframe": "5m",
              "volume_usd": 96000.0,
              "expected_volume_usd": 40000.0,
              "multiplier": 2.4,
              "activity": "high"
            }
          ]
        },
        {
          "chain": "robinhood",
          "chain_id": 4663,
          "points": [
            {
              "timeframe": "24h",
              "volume_usd": 1440000.0,
              "expected_volume_usd": 1440000.0,
              "multiplier": 1.0,
              "activity": "normal"
            },
            {
              "timeframe": "6h",
              "volume_usd": 450000.0,
              "expected_volume_usd": 360000.0,
              "multiplier": 1.25,
              "activity": "high"
            },
            {
              "timeframe": "1h",
              "volume_usd": 96000.0,
              "expected_volume_usd": 60000.0,
              "multiplier": 1.6,
              "activity": "high"
            },
            {
              "timeframe": "5m",
              "volume_usd": 12000.0,
              "expected_volume_usd": 5000.0,
              "multiplier": 2.4,
              "activity": "high"
            }
          ]
        }
      ]
    }
  }
}
```

```jsonc Response (Short) theme={null}
{
  "type": "market_movement_update",
  "room_id": "market_movement",
  "interval_ms": 1000,
  "data": {
    "tt": {
      "cu": {
        "vu": 864000.0,
        "td": 12960,
        "trs": 6480,
        "cr": 864,
        "mg": 216
      },
      "pr": {
        "vu": 691200.0,
        "td": 10800,
        "trs": 5400,
        "cr": 648,
        "mg": 108
      },
      "ch": {
        "vp": 25.0,
        "tp": 20.0,
        "trp": 20.0,
        "cp": 33.33333333333333,
        "mp": 100.0
      },
      "gr": 25.0
    },
    "ch": [
      {
        "c": "solana",
        "ci": -1,
        "cu": {
          "vu": 768000.0,
          "td": 11520,
          "trs": 5760,
          "cr": 768,
          "mg": 192
        },
        "pr": {
          "vu": 614400.0,
          "td": 9600,
          "trs": 4800,
          "cr": 576,
          "mg": 96
        },
        "ch": {
          "vp": 25.0,
          "tp": 20.0,
          "trp": 20.0,
          "cp": 33.33333333333333,
          "mp": 100.0
        },
        "gr": 25.0
      },
      {
        "c": "robinhood",
        "ci": 4663,
        "cu": {
          "vu": 96000.0,
          "td": 1440,
          "trs": 720,
          "cr": 96,
          "mg": 24
        },
        "pr": {
          "vu": 76800.0,
          "td": 1200,
          "trs": 600,
          "cr": 72,
          "mg": 12
        },
        "ch": {
          "vp": 25.0,
          "tp": 20.0,
          "trp": 20.0,
          "cp": 33.33333333333333,
          "mp": 100.0
        },
        "gr": 25.0
      }
    ],
    "da": {
      "b": "24h",
      "ch": [
        {
          "c": "solana",
          "ci": -1,
          "pt": [
            {
              "tf": "24h",
              "vu": 11520000.0,
              "evu": 11520000.0,
              "mul": 1.0,
              "act": "normal"
            },
            {
              "tf": "6h",
              "vu": 3600000.0,
              "evu": 2880000.0,
              "mul": 1.25,
              "act": "high"
            },
            {
              "tf": "1h",
              "vu": 768000.0,
              "evu": 480000.0,
              "mul": 1.6,
              "act": "high"
            },
            {
              "tf": "5m",
              "vu": 96000.0,
              "evu": 40000.0,
              "mul": 2.4,
              "act": "high"
            }
          ]
        },
        {
          "c": "robinhood",
          "ci": 4663,
          "pt": [
            {
              "tf": "24h",
              "vu": 1440000.0,
              "evu": 1440000.0,
              "mul": 1.0,
              "act": "normal"
            },
            {
              "tf": "6h",
              "vu": 450000.0,
              "evu": 360000.0,
              "mul": 1.25,
              "act": "high"
            },
            {
              "tf": "1h",
              "vu": 96000.0,
              "evu": 60000.0,
              "mul": 1.6,
              "act": "high"
            },
            {
              "tf": "5m",
              "vu": 12000.0,
              "evu": 5000.0,
              "mul": 2.4,
              "act": "high"
            }
          ]
        }
      ]
    }
  }
}
```

### Subscription acknowledgement

```json theme={null}
{
  "type": "market_movement_stream_subscribe_response",
  "room_id": "market_movement",
  "data": {
    "chain_ids": [
      -1,
      4663
    ],
    "timeframe": "1h",
    "interval_ms": 1000,
    "rejected": []
  }
}
```

### Unsubscribe

```json theme={null}
{
  "type": "room_message",
  "payload": {
    "room_id": "market_movement",
    "message": {
      "action": "unsubscribe_all"
    }
  }
}
```


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