Trade Execution
Automated order placement via Polymarket CLOB API
Polymarket CLOB API
Polymarket uses a Central Limit Order Book (CLOB) on the Polygon blockchain. The CLOB allows limit orders with specified prices and sizes. Orders are matched on-chain, providing transparent and verifiable execution. The API supports both market and limit order types.
py-clob-client Integration
The py-clob-client Python library handles authentication, order creation, and position management. It abstracts away the complexity of EIP-712 typed data signatures and Polygon transaction formatting. The client manages nonces, gas estimation, and order status polling automatically.
Order Flow
When a signal is detected, the system computes the Kelly-optimal position size, converts to CLOB order parameters (side, price, size), and submits a limit order at the current best price. BUY YES orders bet on the model's predicted bracket. BUY NO orders bet against brackets the model considers overpriced. A 2% fee is deducted from winning positions.