← SDKs & libraries

SDK

polyfill-rs

Integrate Polymarket in Rust with typed CLOB requests, optimized book processing and explicit V2 trading support.

View repositorygithub.com
Available on
Rust, Cargo, WebSocket
Pricing
The repository offers MIT and Apache-2.0 licensing

Screenshots and interface

What is polyfill-rs?

polyfill-rs is a Rust client focused on efficient parsing and order-book hot paths. It provides a general client interface alongside a specialized fixed-point WebSocket book processor. The distinction matters when choosing between ergonomic message handling and tightly controlled allocation behavior.

Who it is for

  • Rust developers building market-data services
  • Teams optimizing order-book processing
  • Users migrating a Rust integration to the V2 client line

Features and coverage

Available on
Rust, Cargo, WebSocket
Markets & venues
Polymarket
  • CLOB client

    Fetch supported market and account data through the Rust interface.

  • V2-native line

    Use the 0.4.x client for the documented authenticated trading conventions.

  • Fixed-point books

    Convert incoming prices into deterministic internal numeric representations.

  • Specialized WebSocket processor

    Apply book updates through an allocation-conscious path.

  • General decoder

    Handle mixed message shapes and unknown events through the compatibility parser.

  • Depth controls

    Limit stored book depth to manage memory.

  • Benchmark tooling

    Inspect separate network, parsing and warmed book-update measurements.

Workflows with polyfill-rs

Build a public-data service

Create a client, fetch a small market page and subscribe to a bounded token set. Choose the specialized or general parser according to the feed requirements.

Measure a bottleneck

Benchmark network time separately from decoding and book updates before changing the data path.

Migrate an integration

Read the 0.4.x breaking changes and adjust authenticated order handling rather than assuming an import rename is sufficient.

Pricing and total cost

The repository offers MIT and Apache-2.0 licensing. The library has no subscription; infrastructure and venue costs are separate.

Getting started

Before you start: Zero-allocation claims apply to specific warmed existing-level paths; new books, new levels and removals can allocate or free memory.

  1. Add the supported polyfill-rs release to Cargo.toml.
  2. Run a public read example.
  3. Choose book depth and parsing path.
  4. Test snapshot and incremental-update handling.
  5. Review V2 authentication changes before adding private actions.
  6. Benchmark the actual workload in its deployment environment.

Useful links

What to check

  • Zero-allocation claims apply to specific warmed existing-level paths; new books, new levels and removals can allocate or free memory.
  • The generic parser is not the specialized zero-allocation path.
  • A snapshot hash identifies state but does not provide logical ordering.
  • Same-timestamp, different-hash snapshots are accepted in arrival order.
  • Published microbenchmarks do not establish end-to-end order latency for another deployment.

A closer look

Ratings & reviews

Write a review
Editorial rating
3.5/ 5
0 user reviews

Our take on polyfill-rs

Typed Rust requests and narrowly described performance paths are useful for specialist integrations. Version choice, snapshot ordering and the limits of benchmark claims need careful engineering 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.

Write a review

How was your experience with polyfill-rs?

Share what you used, what worked and what could be better. We confirm your email and review the submission before publishing.

To submit a review, email info@polytradingbot.com with the tool name, your rating and your experience. Enable JavaScript to prepare a draft here.

Related tools

Browse category

Frequently asked questions about polyfill-rs

Is every operation allocation-free?

No. The documented scope is selected warmed book-update and read paths.

Can I treat a snapshot hash as a sequence?

No. It helps distinguish duplicate state but does not order distinct snapshots.

Does 0.4.x preserve older authenticated flows?

It deliberately introduces V2-related breaking changes.

Which benchmark is useful for an API slowdown?

Separate transport, parsing and local book processing before comparing results.