Whether it be to create a custom dashboard, or just finding out what current positions look like, fetching pool information might be the first and foremost task that most developers will want to use
Initialisation always works the same way -- pick a chain and a provider, and create the ionic object
// Initialisation always works the same way -- // pick a chain and a provider, and create the ionic objectconstsdk=newIonicSdk(provider, chainId);
fetchPoolData
Arguments:
poolId: string
address?: string
Returns:
Promise<IonicPoolData>
The poolId is the canonical pool index, retrievable via the UI. E.g. https://app.ionic.money/56/pool/1 -> poolId = 1
The address is the address of a pool user, e.g. someone that has provided liquidity, or borrowed assets. If passed, the function will returned detailed information about the user's balances.