Expand description
§polymarket-rs
A Rust client library for interacting with the Polymarket CLOB (Central Limit Order Book) API.
This library provides a comprehensive, type-safe interface for:
- Market data queries (public)
- Order creation and management (authenticated)
- Account and balance operations (authenticated)
- Position tracking
- Real-time WebSocket streaming for market data and user events
§Features
- Builder Pattern: Fluent API for constructing clients and orders
- Type Safety: Strong typing with newtypes for IDs (TokenId, OrderId, ConditionId)
- Proper Error Handling: No panics, comprehensive error types
- EIP-712 Signing: Full support for Ethereum wallet signatures
- Decimal Precision: Accurate decimal math for prices and amounts
Re-exports§
pub use error::Error;pub use error::Result;pub use types::ApiCreds;pub use types::AssetType;pub use types::ConditionId;pub use types::CreateOrderOptions;pub use types::ExtraOrderArgs;pub use types::MarketOrderArgs;pub use types::OrderArgs;pub use types::OrderId;pub use types::OrderType;pub use types::PostOrderArgs;pub use types::Side;pub use types::SignatureType;pub use types::TokenId;pub use client::AuthenticatedClient;pub use client::ClobClient;pub use client::DataClient;pub use client::GammaClient;pub use client::TradingClient;pub use websocket::MarketWsClient;pub use websocket::UserWsClient;pub use orders::OrderBuilder;pub use signing::EthSigner;pub use alloy_signer::k256;
Modules§
- client
- config
- error
- orders
- request
- signing
- types
- websocket
- WebSocket clients for streaming market data and user events.
Structs§
- Address
- An Ethereum address, 20 bytes in length.
Traits§
- Stream
Ext - An extension trait for
Streams that provides a variety of convenient combinator functions.
Type Aliases§
- Private
KeySigner - A signer instantiated with a locally stored private key.