MarketModule
@liquidium/client / MarketModule
Class: MarketModule
Defined in: packages/client/src/modules/market/market.ts:31
Pool metadata, prices, and current rate helpers.
Constructors
Constructor
new MarketModule(
canisterContext):MarketModule
Defined in: packages/client/src/modules/market/market.ts:32
Parameters
canisterContext
CanisterContext
Returns
MarketModule
Methods
findPool()
findPool(
query):Promise<Pool>
Defined in: packages/client/src/modules/market/market.ts:101
Resolves a single backing pool for the given Chain + Asset identifier.
Native and chain-key identifiers share a pool. For example, both
ETH/USDT and ICP/USDT resolve to the USDT lending pool.
Parameters
query
The market asset and chain pair to match.
Returns
Promise<Pool>
The single pool that matches the requested asset and chain.
getAssetPrices()
getAssetPrices():
Promise<AssetPrices>
Defined in: packages/client/src/modules/market/market.ts:74
Returns the latest asset prices reported by the protocol.
Returns
Promise<AssetPrices>
The latest protocol price map keyed by market asset symbol.
getPoolRate()
getPoolRate(
poolId):Promise<PoolRate>
Defined in: packages/client/src/modules/market/market.ts:154
Returns the current borrow, lend, and utilization rates for a pool.
Parameters
poolId
string
The pool principal text.
Returns
Promise<PoolRate>
The borrow, lend, and utilization rates for the requested pool.
getReserveData()
getReserveData(
query):Promise<Pool>
Defined in: packages/client/src/modules/market/market.ts:144
Returns the full pool record for the given asset and chain pair.
Convenience wrapper over MarketModule.findPool. listPools() already
enriches each pool with its current rate data, so no extra canister call is made.
Parameters
query
The market asset and chain pair to match.
Returns
Promise<Pool>
The matching pool enriched with current rate data.
listPools()
listPools():
Promise<Pool[]>
Defined in: packages/client/src/modules/market/market.ts:41
Lists SDK-supported pools with their current rates.
Unsupported asset or chain variants returned by the canister are omitted.
Returns
Promise<Pool[]>
Supported lending pools enriched with their current rate data.