deepbook-margin-sdk-pool

Installation
SKILL.md

DeepBook Margin SDK: Margin Pool

The Margin Pool SDK provides functions for supplying assets to earn interest, managing supplier capabilities, tracking referrals, and withdrawing referral fees.


1. SDK API Reference (client.deepbook.marginPool)

Supplier Operations

  • mintSupplierCap() Mints a new SupplierCap object that is used to supply and withdraw from pools.
    • Returns: (tx: Transaction) => TransactionArgument
  • supplyToMarginPool(coinKey: string, supplierCap: TransactionObjectArgument, amountToDeposit: number, referralId?: string) Supplies liquidity into the margin pool. Users optionally associate deposits with a referralId to reward the referrer.
    • Returns: (tx: Transaction) => void
  • withdrawFromMarginPool(coinKey: string, supplierCap: TransactionObjectArgument, amountToWithdraw?: number) Redeems supply shares to withdraw liquidity. If amountToWithdraw is omitted, it redeems all available shares.
    • Returns: (tx: Transaction) => void
Installs
1
First Seen
Sep 4, 2026
deepbook-margin-sdk-pool — nickthelegend/sui-deepbook-skills