LiquidOps Docs
Home
  • 👋Welcome to LiquidOps
  • 📜Protocol
    • Oracle
  • 🔐Security
    • Audits
  • ⚙️Developers
    • LiquidOps JS
      • Installation & quickstart
      • Token data
      • Utility functions
      • oToken data functions
      • Protocol data functions
      • Lending
      • Borrowing
      • Liquidations
      • Retrieving transactions
  • Additional links
    • Send feedback
    • Linktree
  • Social media
    • X
    • Discord
    • GitHub
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Developers
  2. LiquidOps JS

Utility functions

Get balance

const getBalance = await client.getBalance({
  tokenAddress: "XJYGT9ZrVdzQ5d7FzptIsKrJtEF4jWPbgC91bXuBAwU",
  walletAddress: "psh5nUh3VF22Pr8LeoV1K2blRNOOnoVH0BbZ85yRick",
});

Get result

const getResult = await client.getResult({
  transferID: "0RY-eSVV156qxyuHBs3GPO2pwsIvmA-yI1oKS1ABSyI",
  tokenAddress: "XJYGT9ZrVdzQ5d7FzptIsKrJtEF4jWPbgC91bXuBAwU",
  action: "lend", // "lend" | "unLend" | "borrow" | "repay";
});

Transfer tokens

const transfer = await client.transfer({
  token: "QAR",
  recipient: "psh5nUh3VF22Pr8LeoV1K2blRNOOnoVH0BbZ85yRick",
  quantity: 1n,
});
PreviousToken dataNextoToken data functions

Last updated 2 months ago

Was this helpful?

⚙️