2ī¸Retrieve Info & Data

1. Retrieve Address Information

  • Get Account Address:

    account.address
    account.getPublicKey()
  • Retrieve Address Keypair:

    account.keypair
  • Get Address Derivation Path:

    account.getDerivationPath()
  • Retrieve Address Coin Info Across Objects:

    account.getAllCoins(prettyPrint = true) 
    // Fetches details of all coins held across different objects
  • Get Specific Token Info:

    account.getCoins(coinType = "0x2::sui::SUI")
    // Fetches objects for a specific token type (e.g., SUI)
  • Get Address Merged Coin Balance:

    account.getWalletBalance(prettyPrint = true)
    // Merges and displays the balance for the entire wallet
  • Retrieve All Accounts From Mnemonic:

    client.getAllAccounts()

  • Get NAVI Portfolio:

    account.getNAVIPortfolio(address = account.address, prettyPrint = true)
    // Retrieves NAVI positions for the specified address, or defaults to the account address
  • Get NAVI Health Factor:

    account.getHealthFactor(address = account.address)
    // Retrieves health factor; you can input any address
  • Get Available NAVI Rewards:

    client.getAddressAvailableRewards(address = account.address, option = 1)
  • Retrieve Rewards Claimed History:

    client.getUserRewardHistory(userAddress, page = 1, size = 400)
    // Fetches reward claim history for a specified user

3. Retrieve Pool Information

  • Get Pool Information (Including Oracle Prices):

    import { USDC } from 'navi-sdk/dist/address'
    client.getPoolInfo(USDC) 
    // Leave empty to retrieve info for all pools
  • Get Reserve Information:

    client.getReserves(USDC)  
    // Leave empty to retrieve reserves for all pools

4. Get Coin Setup Information

  • Coin Setup Details:

    import { Sui, USDC, USDT, WETH, vSui, haSui, CETUS, NAVX, WBTC, AUSD } from 'navi-sdk/dist/address'
    
    Sui.symbol
    Sui.address
    Sui.decimal

Last updated