Market Router
The Market Router is the primary entry point for all trading operations on Sera. It provides a user-friendly interface for placing orders, executing trades, and claiming proceeds. Address (Sepolia):0x82bfe1b31b6c1c3d201a0256416a18d93331d99e
Limit Orders
limitBid
Places a limit buy order on the order book.uint256- The order index. Returnstype(uint256).maxif order was fully filled.
limitAsk
Places a limit sell order on the order book.limitBid, but uses baseAmount instead of rawAmount.
| Parameter | Usage for Ask |
|---|---|
rawAmount | Not used (set to 0) |
baseAmount | Amount of base tokens to sell |
limitOrder
Places multiple limit orders in a single transaction.Market Orders
marketBid
Executes a market buy order immediately against existing asks.marketAsk
Executes a market sell order immediately against existing bids.Claiming
claim
Claims proceeds from filled orders across multiple markets.Combined Operations
limitBidAfterClaim
Claims orders first, then places a new bid using the claimed proceeds.limitAskAfterClaim
Claims orders first, then places a new ask.marketBidAfterClaim
Claims orders first, then executes a market buy.marketAskAfterClaim
Claims orders first, then executes a market sell.View Functions
isRegisteredMarket
Checks if a market is registered with the router.Minimal ABI Reference
For integrating with the Market Router in JavaScript/TypeScript or Python, use these minimal ABI definitions:JSON ABI (for ethers.js, web3.js, web3.py)
View Complete Minimal ABI
View Complete Minimal ABI
The
claimBounty field in limit order params is reserved for future use. Always set it to 0.