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

Liquidations

Liquidate a position

const liquidate = client.liquidate({
  token: "QAR",
  rewardToken: "USDC",
  targetUserAddress: "psh5nUh3VF22Pr8LeoV1K2blRNOOnoVH0BbZ85yRick",
  quantity: 1n,
});

Get available liquidations

const liquidate = client.getLiquidations();

Get discounted quantity

const getDiscountedQuantity = client.getDiscountedQuantity({
  liquidated,
  rewardToken,
  qualifyingPosition,
  priceData,
  validateMax: false // Optionally validate the liqidated token quantity and the discounted quantity. This will throw an error if any of these quantities are more than what the user holds.
});
PreviousBorrowingNextRetrieving transactions

Last updated 1 month ago

Was this helpful?

⚙️