池
稳定和不相关资产的可变权重 AMM 池,每个池最多 8 项资产。
const pools = new Aftermath("TESTNET").Pools();池子
// single pool
const pool = await pools.getPool({
objectId: "0x..",
});
// multiple pools
const somePools = await pools.getPools({
objectIds: ["0x1..", "0x2.."],
});
// all pools
const allPools = await pools.getAllPools();事件
Deposit
const eventData = await pool.getDepositEvents({
// optional
cursor: {
txDigest: "0x..",
eventSeq: "0x..",
},
limit: 10,
});
console.log(eventData);
/*
{
events: [
{
poolId: "0x..",
depositor: "0x.."
types: ["0x1..", "0x2..", "0x3.."],
deposits: [1_000n, 1_000_000n, 500n],
lpMinted: 34_000_000n,
},
...
],
nextCursor: {...},
}
*/Withdraw
交易
Deposit
Withdraw
计算
Spot Price
Trade Amount Out
Trade Amount In
Deposit LP Amount Out
Withdraw Amounts Out
Last updated