SecureClient is authenticated, you can submit limit orders to the CLOB exchange, inspect your open order book, cancel individual orders, and interact with the Conditional Token Framework (CTF) contracts to convert between USDC and outcome tokens. This page covers each of those operations in order, from placing your first order through on-chain settlement.
All trading operations require the
secure feature flag and a Polygon wallet funded with USDC. Add features = ["secure"] to your Cargo.toml dependency entry and ensure your wallet holds enough USDC to cover the order size plus gas.Place a limit order
Useplace_limit_order with a PlaceLimitOrderRequest to submit a resting limit order to the CLOB. The SDK signs the order payload with your HMAC credentials before sending it:
PlaceLimitOrderRequest fields
| Field | Type | Description |
|---|---|---|
token_id | String | The outcome token identifier for the market side you want to trade. |
side | OrderSide | OrderSide::Buy or OrderSide::Sell. |
price | f64 | Limit price expressed as a probability between 0.0 and 1.0 (e.g. 0.50 = 50¢). |
size | f64 | Number of outcome token shares to buy or sell. |
expiration | Option<u64> | Unix timestamp after which the order is automatically cancelled. Pass None for a good-till-cancelled order. |
post_only | bool | When true, the order is rejected rather than matched if it would cross the spread immediately. |
List open orders
Retrieve all your resting orders across all markets withlist_open_orders. Pass ListOpenOrdersRequest::default() to fetch everything, or populate its fields to filter by market or asset:
Cancel an order
Pass the order ID returned byplace_limit_order to cancel_order to remove a resting order from the book:
CTF wallet operations
The Conditional Token Framework (CTF) is the smart contract system that backs every Polymarket outcome token.SecureClient exposes three on-chain operations that let you move value in and out of positions:
split_position— Converts USDC into a full set of outcome tokens for a market. After splitting, you hold one token for each possible outcome and can trade or hold them individually.merge_positions— The reverse of a split. Combines a complete set of outcome tokens back into USDC at face value, as long as the market has not yet resolved.redeem_positions— After a market resolves, exchanges your winning outcome tokens for USDC at a 1:1 rate. Losing tokens become worthless.
Environment::production().

