OrderArgs
Arguments for creating a new order. This is the input type you use when building an order.Unique identifier for the market (hex string)
Order side:
Side.BUY (0) or Side.SELL (1)Market outcome:
Outcome.YES (0) or Outcome.NO (1)Price scaled by 1e6 (0 to 1,000,000). For example, 500,000 = 50% = $0.50Valid range: 1 to 999,999
Order size in 6 decimals. For example, 1,000,000 = 1 shareMust be positive. For taker orders (orders that fill immediately), size × price must be ≥ $1 USDC.
Unix timestamp when the order expiresMust be positive and in the future.
Order nonce for replay protection. Auto-generated if 0.
Address to receive maker fees (typically left as zero address)
Example
Validation
The dataclass performs automatic validation in__post_init__:
- price: Must be between 1 and 999,999
- size: Must be positive
- expiration: Must be positive
ValueError if validation fails.
SignedOrder
A signed order ready for submission to the API. This is returned byTurbineClient.create_limit_buy() and create_limit_sell().
Market identifier
Trader’s wallet address
Order side (0 = BUY, 1 = SELL)
Outcome (0 = YES, 1 = NO)
Price scaled by 1e6
Size in 6 decimals
Order nonce
Expiration timestamp
Fee recipient address
EIP-712 signature (hex string)
Unique hash identifying this order
Optional gasless USDC approval signature
Methods
to_dict()
Converts the signed order to a dictionary for API submission.
JSON Format
Side
Enum for order side.Usage
Outcome
Enum for market outcomes.Usage
Order
An order on the orderbook (returned byget_orders()).
Unique hash identifying this order
Market identifier
Trader’s wallet address
Order side (0 = BUY, 1 = SELL)
Outcome (0 = YES, 1 = NO)
Price scaled by 1e6
Original order size
Amount filled so far
Amount remaining to be filled
Order nonce
Expiration timestamp
Order status (e.g., “OPEN”, “FILLED”, “CANCELLED”)
Creation timestamp
Example
PermitSignature
EIP-2612 permit signature for gasless USDC approval.The nonce used when signing (must match on-chain)
Amount approved (in USDC with 6 decimals)
Expiration timestamp for the permit
ECDSA signature parameter v
ECDSA signature parameter r (hex string with 0x prefix)
ECDSA signature parameter s (hex string with 0x prefix)
Methods
to_dict()
Converts to dictionary for API submission.
You typically don’t need to create
PermitSignature objects directly. The SDK handles this automatically when you call approve_usdc_for_settlement().