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

# Pricing

> How websocket usage is billed in credits.

Websockets are billed **per message**. You're charged only for the messages we actually deliver to your connection. Rates vary by room so you can pick the streams that fit your cost model.

## Connection Hold

When you open a new websocket connection, a **1 credit hold** is placed immediately. This is charged regardless of how long you stay connected, even if you disconnect before receiving a single message.

<Warning>
  Rapidly opening and closing connections will still incur the 1 credit hold on every connect. Keep long-lived
  connections where possible.
</Warning>

## Integer Rounding

Credits are an integer-based unit, so every charge is **rounded up** to the nearest whole credit. For example, if a billing period accumulates 1.1 credits of websocket usage, you'll be charged **2 credits**.

This means very small amounts of usage still cost at least 1 credit. For accurate cost modelling, aggregate messages over longer windows rather than single events.

## Per-Room Rates

Each room has its own rate per message delivered:

| Room                 | Room ID                           | Rate per message |
| -------------------- | --------------------------------- | ---------------- |
| Trades               | `polymarket_trades`               | 0.002 credits    |
| Oracle Events        | `polymarket_oracle_events`        | 0.002 credits    |
| Asset Prices         | `polymarket_asset_prices`         | 0.005 credits    |
| Asset Window Updates | `polymarket_asset_window_updates` | 0.025 credits    |
| Market Metrics       | `polymarket_market_metrics`       | 0.025 credits    |
| Event Metrics        | `polymarket_event_metrics`        | 0.025 credits    |
| Position Metrics     | `polymarket_position_metrics`     | 0.025 credits    |
| Tag Metrics          | `polymarket_tag_metrics`          | 0.025 credits    |
| Trader PnL           | `polymarket_trader_pnl`           | 0.1 credits      |
| Trader Positions     | `polymarket_trader_positions`     | 0.005 credits    |
| Trader Exit Markers  | `polymarket_trader_pnl_exits`     | 0.025 credits    |
| Holder Metrics       | `polymarket_holder_metrics`       | 0.025 credits    |
| Accounts             | `polymarket_accounts`             | 0.005 credits    |
| Order Book           | `polymarket_order_book`           | 0.001 credits    |
| CLOB Rewards         | `polymarket_clob_rewards`         | 0.01 credits     |
| Events Stream        | `polymarket_events_stream`        | 0.025 credits    |
| Markets Stream       | `polymarket_markets_stream`       | 0.025 credits    |
| Position Liquidity   | `polymarket_position_liquidity`   | 0.001 credits    |
| Market Liquidity     | `polymarket_market_liquidity`     | 0.001 credits    |
| Event Liquidity      | `polymarket_event_liquidity`      | 0.001 credits    |

<Note>Message rates apply to each message actually delivered to your connection, not to every event that occurs upstream. Filters you pass on subscription reduce the number of messages you receive, and therefore your bill.</Note>

## Example Calculations

<Accordion title="Watching 5 markets for trades over an hour">
  A connection subscribed to the Trades room, filtered to 5 condition IDs, receiving an average of 400 messages/hour:

  ```
  (1 credit hold) + (400 × 0.002) = 1 + 0.8 → rounded up = 2 credits/hour
  ```
</Accordion>

<Accordion title="Streaming BTC/ETH price ticks">
  A single connection to Asset Prices filtered to BTC and ETH, averaging 120 ticks/minute (7,200/hour):

  ```
  (1 credit hold) + (7,200 × 0.005) = 1 + 36 = 37 credits/hour
  ```
</Accordion>

<Accordion title="Tracking a single trader's PnL">
  A connection to Trader PnL for one wallet that updates \~30 times/hour:

  ```
  (1 credit hold) + (30 × 0.1) = 1 + 3 = 4 credits/hour
  ```
</Accordion>

## Connection Caps

Each plan has a cap on how many websocket connections you can have open concurrently across your organisation:

| Plan       | Concurrent connections |
| ---------- | ---------------------- |
| Free       | 1                      |
| Hobby      | 50                     |
| Startup    | 250                    |
| Scale      | 1,000                  |
| Enterprise | Unlimited              |

If you need more, reach out to us at [support@struct.to](mailto:support@struct.to).

## Reducing Costs

* **Use filters.** Every room supports filters that narrow down which messages are delivered to your connection. A Trades room with no filters is far more expensive than one filtered to specific condition IDs.
* **Batch by connection, not by subscription.** A single connection can subscribe to multiple rooms, so you only pay the 1 credit hold once.
* **Pick the cheapest stream for your use case.** If all you need is order book state, the Order Book room at 0.001 credits/msg is substantially cheaper than other streams.
* **Avoid reconnect loops.** Every connect incurs the 1 credit hold. Handle temporary network issues with backoff instead of tight reconnect cycles.
