Orders
Submit, view, and cancel orders on Turbine.
Submit Order
Create a new order on the orderbook.
POST /api/v1/ordersRequest Body
{
"order": {
"marketId": "0x1234...abcd",
"trader": "0xYourAddress...",
"side": 0,
"outcome": 0,
"price": 500000,
"size": 10000000,
"nonce": 1234567890,
"expiration": 1735689600,
"makerFeeRecipient": "0x0000000000000000000000000000000000000000"
},
"signature": "0x...",
"permitSignature": {
"nonce": 0,
"value": "100000000",
"deadline": 1735689600,
"v": 27,
"r": "0x...",
"s": "0x..."
}
}Order Fields
marketId
bytes32
Market identifier
trader
address
Your wallet address
side
uint8
0 = BUY, 1 = SELL
outcome
uint8
0 = YES, 1 = NO
price
uint64
Price in USDC (6 decimals, range 1–999999). 500000 = $0.50
size
uint64
Order size in shares (6 decimals). 10000000 = 10 shares
nonce
uint64
Unique nonce for the order
expiration
uint64
Unix timestamp when order expires (must be at least 60 seconds in the future)
makerFeeRecipient
address
Fee recipient (use zero address)
Permit Signature (Optional)
For per-order gasless USDC approval. Include when buying without prior USDC approval.
nonce
uint64
On-chain permit nonce
value
string
Amount to approve (as string)
deadline
uint64
Permit expiration (Unix timestamp)
v
uint8
Signature component
r
string
Signature component (32 bytes hex)
s
string
Signature component (32 bytes hex)
Response
orderHash
string
Unique order identifier (EIP-712 hash)
status
string
"accepted" on success
matches
integer
Number of immediate matches against existing orders
timestamp
uint64
Server timestamp
Validation Rules
Price: Must be between 1 and 999999 (exclusive of 0 and 1000000)
Size: Must be greater than 0
Expiration: Must be at least 60 seconds in the future
Signature: Must be a valid EIP-712 typed data signature (65 bytes)
EIP-712 Signing
Orders must be signed using EIP-712 typed data:
Example
Get User Orders
Retrieve open orders for a user.
Query Parameters
trader
address
Yes
User's wallet address
market
bytes32
No
Filter by market ID
Response
orderHash
string
Order identifier
marketId
string
Market identifier
side
uint8
0 = BUY, 1 = SELL
price
uint64
Order price (6 decimals). 500000 = $0.50
size
uint64
Original order size (6 decimals)
remainingSize
uint64
Unfilled portion (6 decimals). 5000000 = 5 shares remaining
timestamp
uint64
When order was placed
Example
Cancel Order
Cancel an open order.
Path Parameters
hash
string
Order hash to cancel
Query Parameters
marketId
bytes32
Yes
Market ID
side
string
No
"buy" or "sell" (default: "buy")
Response
Example
Get All User Orders
Returns all open orders for a user across all markets on a specific chain.
Path Parameters
address
address
User's wallet address
Query Parameters
chain_id
integer
Yes
Chain ID (e.g., 137)
Response
Example
Failed Trades
Returns trades that failed settlement in the last 24 hours.
Response
Pending Trades
Returns trades waiting for blockchain confirmation.
Response
Settlement Status
Look up the status of a specific settlement transaction.
Path Parameters
txHash
string
Transaction hash
Response
If the transaction is not found, found will be false and all other fields will be omitted.
Matching Behavior
The matches field in the submit response indicates how many counter-orders were matched.
Last updated
