MCDEX
Search…
MCDEX
Overview
Protocol
Mai Protocol V3
V3 AMM Design
Tunable Oracle
Audits
DAO
MCDEX DAO
MCB Tokenomics
Developer
Mai3 Contracts
Mai3 SDK
Quick Start
Get Pool Info
Get Perpetual Info
Get Account
Adding Margin
Removing Margin
Re-Margin
Trade
Collateral
Mai3 Subgraph
Deployed Contracts
Bug Bounty
Trader
Basis Trading
LP Hedging
Powered By
GitBook
Get Pool Info
This guide shows how to get pool by using the
getLiquidityPool
function and get related information from pool object.
Get Pool Object
Can reference
Quick Start
to know how to get
reader
object.
Function
getLiquidityPool(readerObject, liquidityPoolAddress)
parameters
type
description
readerObject
object
reader
object
liquidityPoolAddress
string
address of liquidity pool
Return information from pool object
returns
type
description
isSynced
bool
true if the liquidity pool state is synced to real-time data.
isRunning
bool
true if the liquidity pool is running
isFastCreationEnabled
bool
true if the operator of the liquidity pool is allowed to create new perpetual when the liquidity pool is running
creator
string
address of creator
operator
string
address of operator
transferringOperator
string
address of transferringOperator
governor
string
address of governor
shareToken
string
address of shareToken
vault
string
address of vault
vaultFeeRate
number
vault fee rate
poolCashBalance
number
the amount of cash
Example
1
import
{
getLiquidityPool
}
from
'@mcdex/mai3.js'
;
2
const
pool
=
await
getLiquidityPool
(
reader
,
liquidityPoolAddress
)
Copied!
After getting pool object, can get useful information like previous section. EX: operator, creator.
1
const
operatorAddress
=
pool
.
operator
Copied!
Sample Code
Pool
Previous
Quick Start
Next
Get Perpetual Info
Last modified
6mo ago
Copy link
Contents
Get Pool Object
Function
Example
Sample Code