OrderBook.sol
Storage
Order Struct
struct Order {
address owner;
Side side; // Bid or Ask
uint8 tick; // 1-99
uint256 amount; // Total size
uint256 remaining; // Unfilled size
uint256 batchId; // Batch when placed
uint256 expiry; // Auto-expire timestamp
OrderType orderType; // Limit, PostOnly, IOC, BatchOnly
bool cancelled;
}Key Functions
placeOrder(side, tick, amount, orderType, expiry)
placeOrder(side, tick, amount, orderType, expiry)cancelOrder(orderId)
cancelOrder(orderId)claimFills(orderId[])
claimFills(orderId[])pruneExpiredOrders(orderId[])
pruneExpiredOrders(orderId[])Last updated