Common Operations

These operations work across all LP tokens (ZLP, SLP, USDZ).

Data / read operations

Use the API or DataAPI; the methods are the same.

const zlpMarket = await zlpAPI.valuateMarket()
const slpMarket = await slpAPI.getMarketInfo()
const vaultInfo = await usdzAPI.getVaultInfo('usdc')
const positionCaps = await zlpAPI.getPositionCapInfoList(ownerAddress)
const positions = await zlpAPI.getPositionInfoList(positionCaps, ownerAddress)

Deposit

const depositTx = await zlpAPI.deposit(
  'usdc',             // coin type
  ['coinObjectId'],   // coin object IDs
  1000000,            // amount
  0,                  // minimum amount out (optional)
  'referralAddress',  // optional referral
  'senderAddress'     // optional sender
)
const slpDepositTx = await slpAPI.deposit('usdc', ['coinObjectId'], 1000000)
const usdzDepositTx = await usdzAPI.deposit('usdc', ['coinObjectId'], 1000000)

Withdraw

Swap

Last updated