Skip to main content
TVL: ~$1M | Type: On-chain Orderbook | Docs: clober.io

Overview

Clober is a fully on-chain central limit order book (CLOB) DEX. Unlike AMMs, Clober allows traders to place limit orders at specific price levels, with matching happening entirely on-chain. This is made practical on Monad due to its sub-second block times (~400ms). Each market is represented as a “Book” with discrete price tick levels. The BookManager contract handles all order placement, cancellation, and matching.

Functions

getCloberBooks()

Returns all active Clober order books (markets). Returns
FieldTypeDescription
bookIdbigintUnique book identifier
baseAddressBase token address
quoteAddressQuote token address
unitSizebigintMinimum order unit in base token
makerPolicyobjectMaker fee/rebate policy
takerPolicyobjectTaker fee policy
bestBidnumberBest bid price
bestAsknumberBest ask price
spreadnumberSpread in basis points
import { getCloberBooks } from 'rampart-monad'

const books = await getCloberBooks()
for (const book of books) {
  console.log(`Book ${book.bookId}: bid=${book.bestBid} ask=${book.bestAsk}`)
  console.log(`Spread: ${book.spread} bps`)
}

getCloberBookById()

Returns the full state of a specific Clober order book. Parameters
NameTypeDescription
bookIdbigintBook identifier from getCloberBooks()
Returns
FieldTypeDescription
bookIdbigintBook ID
baseAddressBase token
quoteAddressQuote token
bestBidnumberCurrent best bid price
bestAsknumberCurrent best ask price
spreadnumberSpread in bps
bidDepthDepthLevel[]Bid side depth { price, size }[]
askDepthDepthLevel[]Ask side depth { price, size }[]
lastTradePricenumberPrice of the most recent trade
volume24hnumber24h volume in quote token
import { getCloberBooks, getCloberBookById } from 'rampart-monad'

// Get all books, then read full state of the first one
const books = await getCloberBooks()
const detail = await getCloberBookById(books[0].bookId)

console.log(`Last trade: ${detail.lastTradePrice}`)
console.log(`Bid depth levels: ${detail.bidDepth.length}`)
console.log(`Ask depth levels: ${detail.askDepth.length}`)
Clober’s on-chain orderbook is particularly efficient on Monad due to ~400ms block times. Price levels update in near real-time without requiring WebSocket feeds.

Contract Addresses

ContractAddress
CloberBookManager0xAaA0e933C1E46d04b261e9B4FaAc7AeB93BcCeC1