WebSockets

Errors & limits

Streaming allowances by plan, and the in-band messages the gateway sends when something needs your attention.

Rate limits & quotas

Each plan includes streaming allowances sized for production workloads. A few simple practices keep your integration efficient and well within them:

  • Active subscriptions — a single connection holds many subscriptions at once; your plan sets how many run concurrently.
  • Message rate — events are delivered at your plan's throughput. If you reach it, the gateway sends a single rate_limit notice for that window and keeps your connection open. Filters keep your feed focused and comfortably within budget.
  • Subscribe in one frame — open all your subscriptions in a single subscribe frame. It's the fastest way to start streaming and keeps your client tidy.
  • One connection is all you need — a single connection carries every subscription, so there's rarely a reason to open more.
JSON · server → client
{
  "action": "rate_limit",
  "message": "message rate limit reached"
}

Scale up any time

Your plan includes a streaming allowance that renews each billing period. Need more throughput or more concurrent subscriptions? Upgrade any time — see Pricing & Plans for what each tier includes.

Errors & notices

The gateway always answers — any protocol issue comes back as a clear, in-band error message that names the relevant types and a human-readable message, so your client knows exactly what to do. For example, requesting a type your plan doesn't include yet:

JSON · server → client
{
  "action": "error",
  "types": ["polymarket.does_not_exist"],
  "message": "unauthorized: polymarket.does_not_exist"
}

Filtering on a non-filterable field:

JSON · server → client
{
  "action": "error",
  "types": ["polymarket.trade"],
  "message": "non-filterable keys for polymarket.trade: not_a_real_field"
}

Authentication is checked at the connection upgrade with a standard 401, so only valid tokens stream.