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.
- Add the supported polyfill-rs release to Cargo.toml.
- Run a public read example.
- Choose book depth and parsing path.
- Test snapshot and incremental-update handling.
- Review V2 authentication changes before adding private actions.
- 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
User reviews 0
The main score switches to user ratings after 5 published reviews.
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 categoryFrequently 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.


