Core Order Types
UserOrder
Simplified order interface for users creating orders.TokenID of the Conditional token asset being traded
Price used to create the order
Size in terms of the ConditionalToken
Side of the order (BUY or SELL)
Fee rate, in basis points, charged to the order maker, charged on proceeds
Nonce used for onchain cancellations
Timestamp after which the order is expired
Address of the order taker. The zero address is used to indicate a public order
Example
UserMarketOrder
Simplified market order interface for users.TokenID of the Conditional token asset being traded
Price used to create the order. If not present, the market price will be used.
- BUY orders: $$$ Amount to buy
- SELL orders: Shares to sell
Side of the order (BUY or SELL)
Fee rate, in basis points, charged to the order maker, charged on proceeds
Nonce used for onchain cancellations
Address of the order taker. The zero address is used to indicate a public order
Specifies the type of order execution:
- FOK (Fill or Kill): The order must be filled entirely or not at all
- FAK (Fill and Kill): The order can be partially filled, and any unfilled portion is canceled
Example
SignedOrder
Complete signed order ready for submission to the CLOB.The order signature
Unique salt to ensure entropy
Maker of the order, i.e., the source of funds for the order
Signer of the order
Address of the order taker. The zero address is used to indicate a public order
Token Id of the CTF ERC1155 asset to be bought or sold.
- If BUY: tokenId of the asset to be bought (makerAssetId)
- If SELL: tokenId of the asset to be sold (takerAssetId)
Maker amount, i.e., the max amount of tokens to be sold
Taker amount, i.e., the minimum amount of tokens to be received
Timestamp after which the order is expired
Nonce used for onchain cancellations
Fee rate, in basis points, charged to the order maker, charged on proceeds
The side of the order (BUY or SELL)
Signature type used by the order
OrderData
Order data interface for creating orders before signing.Maker of the order, i.e., the source of funds for the order
Address of the order taker. The zero address is used to indicate a public order
Token Id of the CTF ERC1155 asset to be bought or sold.
- If BUY: tokenId of the asset to be bought (makerAssetId)
- If SELL: tokenId of the asset to be sold (takerAssetId)
Maker amount, i.e., the max amount of tokens to be sold
Taker amount, i.e., the minimum amount of tokens to be received
The side of the order (BUY or SELL)
Fee rate, in basis points, charged to the order maker, charged on proceeds
Nonce used for onchain cancellations
Signer of the order. If not present, the signer is the maker of the order
Timestamp after which the order is expired. If not present, the value is “0” (no expiration)
Signature type used by the order. Default value is “EOA”
NewOrder
Complete order structure for order creation.Order Enums
Side
Order side enumeration.order-utils:
Example
OrderType
Order execution type enumeration.Good Till Cancel: Order remains active until filled or explicitly canceled
Fill or Kill: Order must be filled entirely or not at all
Good Till Date: Order remains active until a specified expiration date
Fill and Kill: Order can be partially filled, and any unfilled portion is canceled
Example
SignatureType
Signature type enumeration for order signing.ECDSA EIP712 signatures signed by Externally Owned Accounts
EIP712 signatures signed by EOAs that own Polymarket Proxy wallets
EIP712 signatures signed by EOAs that own Polymarket Gnosis safes
Order Responses
OpenOrder
Represents an open order on the order book.Example
OrderResponse
Response returned after posting an order.Whether the order was successfully posted
Error message if the order failed
Unique identifier for the order
Array of transaction hashes if the order was filled
Current status of the order
Amount taken in the order
Amount made in the order
OrderPayload
Simple order identifier payload.Order Parameters
PostOrdersArgs
Arguments for posting an order.The signed order to post
Type of order execution (GTC, FOK, GTD, FAK)
If true, the order will only be posted to the book and not immediately matched
OpenOrderParams
Filter parameters for querying open orders.Filter by order ID
Filter by market condition ID
Filter by asset/token ID
OrderMarketCancelParams
Parameters for canceling orders by market.Cancel all orders in this market
Cancel all orders for this asset ID
Order Utilities
OrderHash
Type alias for order hash.OrderSignature
Type alias for order signature.CreateOrderOptions
Options for creating orders.Tick size for the order (“0.1”, “0.01”, “0.001”, or “0.0001”)
Whether the order is for a negative risk market