Skip to main content

MarketModule

@liquidium/client


@liquidium/client / MarketModule

Class: MarketModule

Defined in: external/liquidium-sdk/packages/client/src/modules/market/market.ts:19

Pool metadata, prices, and current rate helpers.

Constructors

Constructor

new MarketModule(canisterContext, apiClient): MarketModule

Defined in: external/liquidium-sdk/packages/client/src/modules/market/market.ts:20

Parameters

canisterContext

CanisterContext

apiClient

ApiClient | undefined

Returns

MarketModule

Methods

findPool()

findPool(query): Promise<Pool>

Defined in: external/liquidium-sdk/packages/client/src/modules/market/market.ts:87

Resolves a single pool for the given asset and chain pair.

Parameters

query

FindPoolQuery

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: external/liquidium-sdk/packages/client/src/modules/market/market.ts:63

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: external/liquidium-sdk/packages/client/src/modules/market/market.ts:129

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: external/liquidium-sdk/packages/client/src/modules/market/market.ts:119

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

FindPoolQuery

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: external/liquidium-sdk/packages/client/src/modules/market/market.ts:30

Lists all pools with their current rates.

Returns

Promise<Pool[]>

All configured lending pools enriched with their current rate data.