Skip to main content

WalletLendNamespace

Wallet Lend Namespace

Methods

FunctionDescription
getMarkets()Get all markets across all configured providers
getMarket()Get a specific market by routing to the correct provider
supportedChainIds()Get supported chain IDs across all providers
openPosition()Open a lending position
getPosition()Get position information for this wallet
closePosition()Close a lending position (withdraw from market)

getMarkets()

Get all markets across all configured providers
ParameterTypeDescription
paramsGetLendMarketsParamsOptional filtering parameters
Returns: Promise resolving to array of markets from all providers Source ↗

getMarket()

Get a specific market by routing to the correct provider
ParameterTypeDescription
paramsGetLendMarketParamsMarket identifier
Returns: Promise resolving to market information Source ↗

supportedChainIds()

Get supported chain IDs across all providers Returns: Array of unique chain IDs supported by any provider Source ↗

openPosition()

Open a lending position
ParameterTypeDescription
paramsLendOpenPositionParamsLending position parameters
params.marketIdMarket identifier to open position in
params.amountnumberAmount to lend
Returns: Promise resolving to transaction receipt Source ↗

getPosition()

Get position information for this wallet
ParameterTypeDescription
paramsGetPositionParamsPosition query parameters
params.marketIdLendMarketIdMarket identifier (required)
params.assetAssetAsset filter (not yet supported)
Returns: Promise resolving to position information Source ↗

closePosition()

Close a lending position (withdraw from market)
ParameterTypeDescription
paramsClosePositionParamsPosition closing parameters
params.marketIdLendMarketIdMarket identifier to close position in
params.amountnumberAmount to withdraw
Returns: Promise resolving to transaction receipt Source ↗