Retrieve positions of ALMM pools
1. Retrieve all pools
Method: magmaSDK.Almm.getUserPositions()
Params:
accountAddress
: The user account address.assignPoolIds
: An array of pool ID.showDisplay
: When some testnet rpc nodes can't return object's display data, you can set this option to false, avoid returning errors. Default set true.
Example
async function retrievelAllPositions() {
const almmPositions = await mainnetSDK.Almm.getUserPositions();
console.log(`positions length: ${almmPositions.length}`);
}
// retrievelAllPositions()
// positions length:: 2
Last updated