Skip to main content

Module decode

Module decode 

Source
Expand description

Data decoding utilities for the Polymarket client.

This module contains the ergonomic decoding layer used for broad API compatibility: tolerant string-or-number deserializers, raw REST response adapters, and generic WebSocket message parsing. Some helpers intentionally parse through serde_json::Value to support Polymarket fields that vary between strings, numbers, nulls, and mixed event batches.

The zero-allocation WS book processing path is separate. Use crate::ws_hot_path::WsBookUpdateProcessor when applying high-throughput book messages directly to crate::book::OrderBookManager.

Modules§

deserializers
Flexible string-or-number deserializers for inconsistent API fields.
fast_parse
Optimized parsers for common data types

Structs§

BatchDecoder
Batch parsing utilities for high-throughput scenarios
RawBookLevel
RawMarketResponse
RawOrderBookResponse
Raw API response types for efficient parsing
RawOrderResponse
RawToken
RawTradeResponse

Traits§

Decoder
Decoder implementations for converting raw responses to client types

Functions§

parse_stream_messages
Ergonomic WebSocket message parsing (official event_type shape).
parse_stream_messages_bytes
See parse_stream_messages.