MCDEX
Search…
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
Last modified 23d ago