Documentation

    DeepBookContract class for managing DeepBook operations.

    Index

    Constructors

    Methods

    • Parameters

      • poolKey: string

        Key of the pool

      • managerKey: string

        The key of the BalanceManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the account information for a given pool and balance manager

    • Parameters

      • poolKey: string

        The key to identify the pool

      • managerKey: string

        Key of the balance manager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get open orders for a balance manager in a pool

    • Parameters

      • targetPoolKey: string

        The key to identify the target pool

      • referencePoolKey: string

        The key to identify the reference pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Add a deep price point for a target pool using a reference pool

    • Parameters

      • poolKey: string

        The key to identify the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Burn DEEP tokens from the pool

    • Parameters

      • poolKey: string

        The key to identify the pool

      • balanceManagerKey: string

        The key to identify the BalanceManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Cancel all open orders for a balance manager

    • Parameters

      • poolKey: string

        The key to identify the pool

      • balanceManagerKey: string

        The key to identify the BalanceManager

      • orderId: string

        Order ID to cancel

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Cancel an existing order

    • Parameters

      • poolKey: string

        The key to identify the pool

      • balanceManagerKey: string

        The key to identify the BalanceManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Claim rebates for a balance manager

    • Parameters

      • params: CreatePermissionlessPoolParams

        Parameters for creating permissionless pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Create a new pool permissionlessly

    • Parameters

      • poolKey: string

        The key to identify the pool

      • quoteQuantity: number

        Quote quantity to convert

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the base quantity out for a given quote quantity in

    • Parameters

      • poolKey: string

        The key to identify the pool

      • priceLow: number

        Lower bound of the price range

      • priceHigh: number

        Upper bound of the price range

      • isBid: boolean

        Whether to get bid or ask orders

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get level 2 order book specifying range of price

    • Parameters

      • poolKey: string

        The key to identify the pool

      • tickFromMid: number

        Number of ticks from mid-price

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get level 2 order book ticks from mid-price for a pool

    • Parameters

      • poolKey: string

        The key to identify the pool

      • orderId: string

        Order ID to get

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Gets an order

    • Parameters

      • poolKey: string

        The identifier key for the pool to retrieve orders from.

      • orderIds: string[]

        Array of order IDs to retrieve.

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Prepares a transaction to retrieve multiple orders from a specified pool.

    • Parameters

      • poolKey: string

        The key to identify the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the DEEP price conversion for a pool

    • Parameters

      • baseType: string

        Type of the base asset

      • quoteType: string

        Type of the quote asset

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the pool ID by asset types

    • Parameters

      • poolKey: string

        The key to identify the pool

      • baseQuantity: number

        Base quantity to convert

      • quoteQuantity: number

        Quote quantity to convert

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the quantity out for a given base or quote quantity

    • Parameters

      • poolKey: string

        The key to identify the pool

      • baseQuantity: number

        Base quantity to convert

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the quote quantity out for a given base quantity in

    • Parameters

      • poolKey: string

        Key of the pool

      • managerKey: string

        The key of the BalanceManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the locked balance for a given pool and balance manager

    • Parameters

      • poolKey: string

        The key to identify the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the mid price for a pool

    • Parameters

      • poolKey: string

        The key to identify the pool

      • balanceManagerKey: string

        The key to identify the BalanceManager

      • orderId: string

        Order ID to modify

      • newQuantity: number

        New quantity for the order

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Modify an existing order

    • Parameters

      • params: PlaceLimitOrderParams

        Parameters for placing a limit order

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Place a limit order

    • Parameters

      • params: PlaceMarketOrderParams

        Parameters for placing a market order

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Place a market order

    • Parameters

      • poolKey: string

        Key of the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the book parameters for a given pool, including tick size, lot size, and min size.

    • Parameters

      • poolKey: string

        Key of the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the trade parameters for a given pool, including taker fee, maker fee, and stake required.

    • Parameters

      • params: SwapParams

        Parameters for the swap

      Returns (
          tx: Transaction,
      ) => readonly [
          { $kind: "NestedResult"; NestedResult: [number, number] },
          { $kind: "NestedResult"; NestedResult: [number, number] },
          { $kind: "NestedResult"; NestedResult: [number, number] },
      ]

      A function that takes a Transaction object

      Swap exact base amount for quote amount

    • Parameters

      • params: SwapParams

        Parameters for the swap

      Returns (
          tx: Transaction,
      ) => readonly [
          { $kind: "NestedResult"; NestedResult: [number, number] },
          { $kind: "NestedResult"; NestedResult: [number, number] },
          { $kind: "NestedResult"; NestedResult: [number, number] },
      ]

      A function that takes a Transaction object

      Swap exact quote amount for base amount

    • Parameters

      • poolKey: string

        The key to identify the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Get the vault balances for a pool

    • Parameters

      • poolKey: string

        The key to identify the pool

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Check if a pool is whitelisted

    • Parameters

      • poolKey: string

        The key to identify the pool

      • balanceManagerKey: string

        The key to identify the BalanceManager

      Returns (tx: Transaction) => void

      A function that takes a Transaction object

      Withdraw settled amounts for a balance manager

    MMNEPVFCICPMFPCPTTAAATR