Integration Guide
This section outlines the steps required to integrate Clober into your aggregator:
- Tracking the Open Event
- Querying Book Liquidity
- Querying Expected Output Amount
- Building a Transaction for a Market Order
Market Structure
A market in Clober is composed of two Book structs: the ask book and the bid book. Each Book is distinguished by a primary key called the BookKey
, which is explained in detail on this page. Note that the term market here refers to an abstract concept, not an actual contract.
For example, in an ETH/USDC market:
- The asset in the bid book is USDC.
- The asset in the ask book is ETH.
Subgraph Endpoint
Deployed Contracts
- Controller:
0xADc0CC0c3Ea12e57b8BcB7d7C8ac03222487E337
- BookManager:
0xD4aD5Ed9E1436904624b6dB8B1BE31f36317C636
- BookViewer:
0xe81e78f946e34d13Dcb6fd46a78713E0FFDA5613