Skip to main content
Both SDKs ship a typed WebSocket client for the ParlayX orderbook stream. Each wraps the raw WebSocket API, putting the handshake, subscription bookkeeping, keepalive, and reconnect-with-resubscribe behind a small surface, and delivers every server frame typed.
The streaming client ships inside the same package as the REST client in both languages, so there is nothing extra to install. It is the @parlayx/sdk/stream subpath in TypeScript, and the parlayx.stream module in Python with no [stream] extra. See Installation.

When to use it

Reach for the streaming client when you need live market data: a full orderbook snapshot followed by a continuous, gap-free stream of price-level changes, and optionally the market’s public trade tape. For everything else (placing and managing orders, reading balances, one-off market lookups) use the REST client. The two are complementary: stream prices in, route orders out.

What you get

  • Typed frames. Every server frame is a typed object, narrowed to that frame’s shape.
  • Automatic resubscribe. Subscriptions are replayed on every reconnect, so a dropped connection is transparent to your application.
  • Keepalive and reconnect. Ping/pong liveness and exponential-backoff reconnect are built in.

The one shape difference

The two clients deliver frames differently, and it is the only place the streaming SDKs diverge in more than naming. TypeScript is an event emitter, so you register a handler per frame type. Python is an async iterator, so you loop and branch on frame.type.
The Python client is async only, because an async iterator is what it is. There is no synchronous stream client to pair with ParlayX. Continue to Authentication to set up your signing key, then the Quickstart.