Get pools
1. Get all pools
use sdk.Pool.fetchAllPools
method.
Example
async function fetchAllPools() {
const poolItems = await sdk.Pool.fetchAllPools();
console.log(poolItems)
}
2. Get pool by poolId
async function fetchOnePool() {
const pool = await sdk.Pool.fetchPoolById({
poolId: '0xf108...876b5'
})
}
3. Get pool by token asset types and feeTier
(from v0.0.7)
async function fetchOnePool() {
const pool = await sdk.Pool.getPoolByTokenPairAndFeeTier({
token1: '0x1::aptos_coin::AptosCoin',
token2: '0x6926bff1eab5554fa72ae167ed736acf623ab17fe81ebf2ea0d2138f8c533f77::type::T',
feeTier: FeeTierIndex["PER_0.01_SPACING_1"],
})
}
The White Paper is for informational purposes only. Nothing in the White Paper constitutes legal, financial or tax advice. Its content may be updated from time to time without express notice. You should seek your own professional advice before engaging in any activity in connection with Hyperion. See Legal Disclaimer.
Last updated