← SDKs & libraries

SDK

polyfill-rs: Rust CLOB Client and Book Processing

polyfill-rs is a Rust/Cargo Polymarket client for CLOB data and authenticated actions, with WebSocket book processing. Its 0.4.x line introduces V2 trading conventions.

Available on
API
Pricing
MIT and Apache-2.0 licensing is offered. No library subscription; infrastructure and venue costs are separate.

Screenshots and interface

What is polyfill-rs?

Fixed-point representations make internal price processing deterministic, while stored depth can be limited. Choose between the specialized allocation-conscious processor and a general compatibility decoder for mixed messages and unknown events.

Zero-allocation claims cover selected warmed existing-level updates and reads, not new books, new levels or removals. Snapshot hashes identify state without logical ordering; distinct hashes at the same timestamp are accepted in arrival order. Published microbenchmarks do not establish another deployment's end-to-end order latency.

Who it is for

  • Rust market-data services.
  • Teams optimizing book processing.
  • Rust integrations migrating to V2.

Features and coverage

  • CLOB client

    Read supported market and account data in Rust.

  • V2 line

    Use 0.4.x authenticated trading conventions.

  • Fixed-point books

    Convert prices to deterministic internal numbers.

  • Specialized processor

    Apply updates through an allocation-conscious WebSocket path.

  • General decoder

    Handle mixed shapes and unknown messages through compatibility parsing.

  • Depth controls

    Limit stored levels to manage memory.

  • Benchmarks

    Separate network, decoding and warmed book-update measurements.

Workflows with polyfill-rs

Build a reader

Read a small market page and subscribe to bounded tokens. Select the parser for the feed requirements.

Measure a bottleneck

Separate network time, decoding and book processing before changing the data path.

Migrate to V2

Read 0.4.x breaking changes and adjust authentication and orders rather than only renaming imports.

Pricing and total cost

MIT and Apache-2.0 licensing is offered. No library subscription; infrastructure and venue costs are separate.

Getting started

Before you start: The general parser is not the specialized zero-allocation path.

  1. Add a supported release to Cargo.toml.
  2. Run a public-read example.
  3. Choose depth and parser.
  4. Check snapshots and incremental updates.
  5. Review V2 authentication before private actions.
  6. Benchmark the actual deployment workload.

Allocation-free claims concern selected warmed existing-level paths; new books, levels and removals can allocate or free memory.

Useful links

What to check

  • The general parser is not the specialized zero-allocation path.
  • A snapshot hash is not a sequence number.
  • Same-time snapshots with different hashes follow arrival order.
  • Microbenchmarks do not establish end-to-end order latency.

A closer look

Ratings & reviews

Editorial rating
3.5/ 5
0 user reviews

Our take on polyfill-rs

Typed Rust requests and narrowly scoped performance paths suit specialist integrations. Version changes, snapshot ordering and benchmark limits require careful review.

Based on documented features, setup and access terms. How we rate

User reviews 0

The main score switches to user ratings after 5 published reviews.

Be the first to share your experience

A specific example helps the next person choose the right tool.

Related tools

Browse category

Frequently asked questions about polyfill-rs

Is every operation allocation-free?

No. Only selected warmed updates and reads have that documented scope.

Can a hash order snapshots?

No. It distinguishes state, not ordering among different snapshots.

Does 0.4.x preserve old authenticated flows?

No. It introduces V2-related breaking changes.

Which measurement explains API slowdown?

Separate transport, decoding and local book updates.