Polymarket/rs-clob-client-v2 — reverse-engineered prompt
Reverse engineered prompt
Build me a Rust client library for Polymarket that makes it easy to work with their order book and related APIs.
I want someone using it to be able to fetch markets, orders, trades, balances, prices, and other public data without logging in, then authenticate with a wallet private key when they need private actions like API keys or placing signed orders. Please make the client feel safe and hard to misuse, so authenticated methods aren’t available before login. It should support normal wallets and Polymarket proxy or Safe wallets, including deriving the right funder address when possible.
Include clean order builders, typed request and response models, async HTTP calls, serde support, useful errors, and optional WebSocket streaming for live prices, order books, and user events. Also add optional modules for data, market discovery, bridge deposits, RFQ, real time data streams, heartbeats, and CTF actions if they fit.
Please include examples, tests, feature flags, and a clear README. Look up current Polymarket docs online if you need to.
Want more depth? Deep Reverse