Documentation
Preparing search index...
@mysten/deepbook-v3
DeepBookClient
Class DeepBookClient
DeepBookClient class for managing DeepBook operations.
Index
Constructors
constructor
Properties
balance
Manager
deep
Book
deep
Book
Admin
flash
Loans
governance
margin
Admin
margin
Liquidations
margin
Maintainer
margin
Manager
margin
Pool
margin
Registry
margin
TPSL
pool
Proxy
Methods
account
account
Exists
account
Open
Orders
balance
Manager
Referral
Owner
balance
Manager
Referral
Pool
Id
can
Place
Limit
Order
can
Place
Market
Order
check
Limit
Order
Params
check
Manager
Balance
check
Manager
Balances
With
Address
check
Manager
Balance
With
Address
check
Market
Order
Params
decode
Order
Id
get
Account
Order
Details
get
Allowed
Maintainers
get
Allowed
Pause
Caps
get
Balance
Manager
Ids
get
Balance
Manager
Referral
Id
get
Base
Margin
Pool
Id
get
Base
Quantity
In
get
Base
Quantity
Out
get
Base
Quantity
Out
Input
Fee
get
Conditional
Order
Ids
get
Highest
Trigger
Below
Price
get
Level2
Range
get
Level2
Ticks
From
Mid
get
Liquidation
Risk
Ratio
get
Lowest
Trigger
Above
Price
get
Margin
Manager
Assets
get
Margin
Manager
Balance
Manager
Id
get
Margin
Manager
Balances
get
Margin
Manager
Base
Balance
get
Margin
Manager
Borrowed
Base
Shares
get
Margin
Manager
Borrowed
Quote
Shares
get
Margin
Manager
Borrowed
Shares
get
Margin
Manager
Debts
get
Margin
Manager
Deep
Balance
get
Margin
Manager
Deepbook
Pool
get
Margin
Manager
Has
Base
Debt
get
Margin
Manager
Ids
For
Owner
get
Margin
Manager
Margin
Pool
Id
get
Margin
Manager
Owner
get
Margin
Manager
Quote
Balance
get
Margin
Manager
State
get
Margin
Manager
States
get
Margin
Pool
Borrow
Shares
get
Margin
Pool
Id
get
Margin
Pool
Interest
Rate
get
Margin
Pool
Last
Update
Timestamp
get
Margin
Pool
Max
Utilization
Rate
get
Margin
Pool
Min
Borrow
get
Margin
Pool
Protocol
Spread
get
Margin
Pool
Supply
Cap
get
Margin
Pool
Supply
Shares
get
Margin
Pool
Total
Borrow
get
Margin
Pool
Total
Supply
get
Min
Borrow
Risk
Ratio
get
Min
Withdraw
Risk
Ratio
get
Order
get
Order
Deep
Required
get
Order
Normalized
get
Orders
get
Pool
Deep
Price
get
Pool
Id
By
Assets
get
Pool
Liquidation
Reward
get
Pool
Referral
Balances
get
Price
Info
Object
get
Price
Info
Object
Age
get
Price
Info
Objects
get
Quantity
Out
get
Quantity
Out
Input
Fee
get
Quote
Margin
Pool
Id
get
Quote
Quantity
In
get
Quote
Quantity
Out
get
Quote
Quantity
Out
Input
Fee
get
Target
Liquidation
Risk
Ratio
get
User
Liquidation
Reward
get
User
Supply
Amount
get
User
Supply
Shares
is
Deepbook
Pool
Allowed
is
Pool
Enabled
For
Margin
locked
Balance
mid
Price
pool
Book
Params
pool
Id
pool
Referral
Multiplier
pool
Trade
Params
pool
Trade
Params
Next
quorum
registered
Pool
stable
Pool
vault
Balances
whitelisted
Constructors
constructor
new
DeepBookClient
(
__namedParameters
:
DeepBookClientOptions
)
:
DeepBookClient
Creates a new DeepBookClient instance
Parameters
__namedParameters
:
DeepBookClientOptions
Returns
DeepBookClient
Properties
balance
Manager
balanceManager
:
BalanceManagerContract
deep
Book
deepBook
:
DeepBookContract
deep
Book
Admin
deepBookAdmin
:
DeepBookAdminContract
flash
Loans
flashLoans
:
FlashLoanContract
governance
governance
:
GovernanceContract
margin
Admin
marginAdmin
:
MarginAdminContract
margin
Liquidations
marginLiquidations
:
MarginLiquidationsContract
margin
Maintainer
marginMaintainer
:
MarginMaintainerContract
margin
Manager
marginManager
:
MarginManagerContract
margin
Pool
marginPool
:
MarginPoolContract
margin
Registry
marginRegistry
:
MarginRegistryContract
margin
TPSL
marginTPSL
:
MarginTPSLContract
pool
Proxy
poolProxy
:
PoolProxyContract
Methods
account
account
(
poolKey
:
string
,
managerKey
:
string
)
:
Promise
<
AccountInfo
>
Parameters
poolKey
:
string
managerKey
:
string
Returns
Promise
<
AccountInfo
>
account
Exists
accountExists
(
poolKey
:
string
,
managerKey
:
string
)
:
Promise
<
boolean
>
Parameters
poolKey
:
string
managerKey
:
string
Returns
Promise
<
boolean
>
account
Open
Orders
accountOpenOrders
(
poolKey
:
string
,
managerKey
:
string
)
:
Promise
<
string
[]
>
Parameters
poolKey
:
string
managerKey
:
string
Returns
Promise
<
string
[]
>
balance
Manager
Referral
Owner
balanceManagerReferralOwner
(
referral
:
string
)
:
Promise
<
string
>
Parameters
referral
:
string
Returns
Promise
<
string
>
balance
Manager
Referral
Pool
Id
balanceManagerReferralPoolId
(
referral
:
string
)
:
Promise
<
string
>
Parameters
referral
:
string
Returns
Promise
<
string
>
can
Place
Limit
Order
canPlaceLimitOrder
(
params
:
CanPlaceLimitOrderParams
)
:
Promise
<
boolean
>
Parameters
params
:
CanPlaceLimitOrderParams
Returns
Promise
<
boolean
>
can
Place
Market
Order
canPlaceMarketOrder
(
params
:
CanPlaceMarketOrderParams
)
:
Promise
<
boolean
>
Parameters
params
:
CanPlaceMarketOrderParams
Returns
Promise
<
boolean
>
check
Limit
Order
Params
checkLimitOrderParams
(
poolKey
:
string
,
price
:
number
|
bigint
,
quantity
:
number
|
bigint
,
expireTimestamp
:
number
,
)
:
Promise
<
boolean
>
Parameters
poolKey
:
string
price
:
number
|
bigint
quantity
:
number
|
bigint
expireTimestamp
:
number
Returns
Promise
<
boolean
>
check
Manager
Balance
checkManagerBalance
(
managerKey
:
string
,
coinKey
:
string
,
)
:
Promise
<
ManagerBalance
>
Parameters
managerKey
:
string
coinKey
:
string
Returns
Promise
<
ManagerBalance
>
check
Manager
Balances
With
Address
checkManagerBalancesWithAddress
(
managerAddresses
:
string
[]
,
coinKeys
:
string
[]
,
)
:
Promise
<
Record
<
string
,
Record
<
string
,
number
>
>
>
Parameters
managerAddresses
:
string
[]
coinKeys
:
string
[]
Returns
Promise
<
Record
<
string
,
Record
<
string
,
number
>
>
>
check
Manager
Balance
With
Address
checkManagerBalanceWithAddress
(
managerAddress
:
string
,
coinKey
:
string
,
)
:
Promise
<
ManagerBalance
>
Parameters
managerAddress
:
string
coinKey
:
string
Returns
Promise
<
ManagerBalance
>
check
Market
Order
Params
checkMarketOrderParams
(
poolKey
:
string
,
quantity
:
number
|
bigint
,
)
:
Promise
<
boolean
>
Parameters
poolKey
:
string
quantity
:
number
|
bigint
Returns
Promise
<
boolean
>
decode
Order
Id
decodeOrderId
(
encodedOrderId
:
bigint
)
:
DecodedOrderId
Parameters
encodedOrderId
:
bigint
Returns
DecodedOrderId
get
Account
Order
Details
getAccountOrderDetails
(
poolKey
:
string
,
managerKey
:
string
,
)
:
Promise
<
|
[
]
|
{
balance_manager_id
:
string
;
client_order_id
:
string
;
epoch
:
string
;
expire_timestamp
:
string
;
fee_is_deep
:
boolean
;
filled_quantity
:
string
;
order_deep_price
:
{
asset_is_base
:
boolean
;
deep_per_asset
:
string
}
;
order_id
:
string
;
quantity
:
string
;
status
:
number
;
}
[]
,
>
Parameters
poolKey
:
string
managerKey
:
string
Returns
Promise
<
|
[
]
|
{
balance_manager_id
:
string
;
client_order_id
:
string
;
epoch
:
string
;
expire_timestamp
:
string
;
fee_is_deep
:
boolean
;
filled_quantity
:
string
;
order_deep_price
:
{
asset_is_base
:
boolean
;
deep_per_asset
:
string
}
;
order_id
:
string
;
quantity
:
string
;
status
:
number
;
}
[]
,
>
get
Allowed
Maintainers
getAllowedMaintainers
()
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
get
Allowed
Pause
Caps
getAllowedPauseCaps
()
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
get
Balance
Manager
Ids
getBalanceManagerIds
(
owner
:
string
)
:
Promise
<
string
[]
>
Parameters
owner
:
string
Returns
Promise
<
string
[]
>
get
Balance
Manager
Referral
Id
getBalanceManagerReferralId
(
managerKey
:
string
,
poolKey
:
string
,
)
:
Promise
<
string
|
null
>
Parameters
managerKey
:
string
poolKey
:
string
Returns
Promise
<
string
|
null
>
get
Base
Margin
Pool
Id
getBaseMarginPoolId
(
poolKey
:
string
)
:
Promise
<
string
>
Parameters
poolKey
:
string
Returns
Promise
<
string
>
get
Base
Quantity
In
getBaseQuantityIn
(
poolKey
:
string
,
targetQuoteQuantity
:
number
|
bigint
,
payWithDeep
:
boolean
,
)
:
Promise
<
BaseQuantityIn
>
Parameters
poolKey
:
string
targetQuoteQuantity
:
number
|
bigint
payWithDeep
:
boolean
Returns
Promise
<
BaseQuantityIn
>
get
Base
Quantity
Out
getBaseQuantityOut
(
poolKey
:
string
,
quoteQuantity
:
number
|
bigint
,
)
:
Promise
<
BaseQuantityOut
>
Parameters
poolKey
:
string
quoteQuantity
:
number
|
bigint
Returns
Promise
<
BaseQuantityOut
>
get
Base
Quantity
Out
Input
Fee
getBaseQuantityOutInputFee
(
poolKey
:
string
,
quoteQuantity
:
number
|
bigint
,
)
:
Promise
<
BaseQuantityOut
>
Parameters
poolKey
:
string
quoteQuantity
:
number
|
bigint
Returns
Promise
<
BaseQuantityOut
>
get
Conditional
Order
Ids
getConditionalOrderIds
(
marginManagerKey
:
string
)
:
Promise
<
string
[]
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
string
[]
>
get
Highest
Trigger
Below
Price
getHighestTriggerBelowPrice
(
marginManagerKey
:
string
)
:
Promise
<
bigint
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
bigint
>
get
Level2
Range
getLevel2Range
(
poolKey
:
string
,
priceLow
:
number
|
bigint
,
priceHigh
:
number
|
bigint
,
isBid
:
boolean
,
)
:
Promise
<
Level2Range
>
Parameters
poolKey
:
string
priceLow
:
number
|
bigint
priceHigh
:
number
|
bigint
isBid
:
boolean
Returns
Promise
<
Level2Range
>
get
Level2
Ticks
From
Mid
getLevel2TicksFromMid
(
poolKey
:
string
,
ticks
:
number
,
)
:
Promise
<
Level2TicksFromMid
>
Parameters
poolKey
:
string
ticks
:
number
Returns
Promise
<
Level2TicksFromMid
>
get
Liquidation
Risk
Ratio
getLiquidationRiskRatio
(
poolKey
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
Returns
Promise
<
number
>
get
Lowest
Trigger
Above
Price
getLowestTriggerAbovePrice
(
marginManagerKey
:
string
)
:
Promise
<
bigint
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
bigint
>
get
Margin
Manager
Assets
getMarginManagerAssets
(
marginManagerKey
:
string
,
decimals
?:
number
,
)
:
Promise
<
MarginManagerAssets
>
Parameters
marginManagerKey
:
string
decimals
:
number
= 6
Returns
Promise
<
MarginManagerAssets
>
get
Margin
Manager
Balance
Manager
Id
getMarginManagerBalanceManagerId
(
marginManagerAddress
:
string
)
:
Promise
<
string
>
Parameters
marginManagerAddress
:
string
Returns
Promise
<
string
>
get
Margin
Manager
Balances
getMarginManagerBalances
(
marginManagers
:
Record
<
string
,
string
>
,
decimals
?:
number
,
)
:
Promise
<
Record
<
string
,
MarginManagerBalancesResult
>
>
Parameters
marginManagers
:
Record
<
string
,
string
>
decimals
:
number
= 9
Returns
Promise
<
Record
<
string
,
MarginManagerBalancesResult
>
>
get
Margin
Manager
Base
Balance
getMarginManagerBaseBalance
(
marginManagerKey
:
string
,
decimals
?:
number
,
)
:
Promise
<
string
>
Parameters
marginManagerKey
:
string
decimals
:
number
= 9
Returns
Promise
<
string
>
get
Margin
Manager
Borrowed
Base
Shares
getMarginManagerBorrowedBaseShares
(
marginManagerKey
:
string
)
:
Promise
<
string
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
string
>
get
Margin
Manager
Borrowed
Quote
Shares
getMarginManagerBorrowedQuoteShares
(
marginManagerKey
:
string
)
:
Promise
<
string
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
string
>
get
Margin
Manager
Borrowed
Shares
getMarginManagerBorrowedShares
(
marginManagerKey
:
string
,
)
:
Promise
<
BorrowedShares
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
BorrowedShares
>
get
Margin
Manager
Debts
getMarginManagerDebts
(
marginManagerKey
:
string
,
decimals
?:
number
,
)
:
Promise
<
MarginManagerDebts
>
Parameters
marginManagerKey
:
string
decimals
:
number
= 6
Returns
Promise
<
MarginManagerDebts
>
get
Margin
Manager
Deep
Balance
getMarginManagerDeepBalance
(
marginManagerKey
:
string
,
decimals
?:
number
,
)
:
Promise
<
string
>
Parameters
marginManagerKey
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
get
Margin
Manager
Deepbook
Pool
getMarginManagerDeepbookPool
(
marginManagerKey
:
string
)
:
Promise
<
string
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
string
>
get
Margin
Manager
Has
Base
Debt
getMarginManagerHasBaseDebt
(
marginManagerKey
:
string
)
:
Promise
<
boolean
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
boolean
>
get
Margin
Manager
Ids
For
Owner
getMarginManagerIdsForOwner
(
owner
:
string
)
:
Promise
<
string
[]
>
Parameters
owner
:
string
Returns
Promise
<
string
[]
>
get
Margin
Manager
Margin
Pool
Id
getMarginManagerMarginPoolId
(
marginManagerKey
:
string
)
:
Promise
<
string
|
null
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
string
|
null
>
get
Margin
Manager
Owner
getMarginManagerOwner
(
marginManagerKey
:
string
)
:
Promise
<
string
>
Parameters
marginManagerKey
:
string
Returns
Promise
<
string
>
get
Margin
Manager
Quote
Balance
getMarginManagerQuoteBalance
(
marginManagerKey
:
string
,
decimals
?:
number
,
)
:
Promise
<
string
>
Parameters
marginManagerKey
:
string
decimals
:
number
= 9
Returns
Promise
<
string
>
get
Margin
Manager
State
getMarginManagerState
(
marginManagerKey
:
string
,
decimals
?:
number
,
)
:
Promise
<
MarginManagerState
>
Parameters
marginManagerKey
:
string
decimals
:
number
= 6
Returns
Promise
<
MarginManagerState
>
get
Margin
Manager
States
getMarginManagerStates
(
marginManagers
:
Record
<
string
,
string
>
,
decimals
?:
number
,
)
:
Promise
<
Record
<
string
,
MarginManagerState
>
>
Parameters
marginManagers
:
Record
<
string
,
string
>
decimals
:
number
= 6
Returns
Promise
<
Record
<
string
,
MarginManagerState
>
>
get
Margin
Pool
Borrow
Shares
getMarginPoolBorrowShares
(
coinKey
:
string
,
decimals
?:
number
)
:
Promise
<
string
>
Parameters
coinKey
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
get
Margin
Pool
Id
getMarginPoolId
(
coinKey
:
string
)
:
Promise
<
string
>
Parameters
coinKey
:
string
Returns
Promise
<
string
>
get
Margin
Pool
Interest
Rate
getMarginPoolInterestRate
(
coinKey
:
string
)
:
Promise
<
number
>
Parameters
coinKey
:
string
Returns
Promise
<
number
>
get
Margin
Pool
Last
Update
Timestamp
getMarginPoolLastUpdateTimestamp
(
coinKey
:
string
)
:
Promise
<
number
>
Parameters
coinKey
:
string
Returns
Promise
<
number
>
get
Margin
Pool
Max
Utilization
Rate
getMarginPoolMaxUtilizationRate
(
coinKey
:
string
)
:
Promise
<
number
>
Parameters
coinKey
:
string
Returns
Promise
<
number
>
get
Margin
Pool
Min
Borrow
getMarginPoolMinBorrow
(
coinKey
:
string
,
decimals
?:
number
)
:
Promise
<
string
>
Parameters
coinKey
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
get
Margin
Pool
Protocol
Spread
getMarginPoolProtocolSpread
(
coinKey
:
string
)
:
Promise
<
number
>
Parameters
coinKey
:
string
Returns
Promise
<
number
>
get
Margin
Pool
Supply
Cap
getMarginPoolSupplyCap
(
coinKey
:
string
,
decimals
?:
number
)
:
Promise
<
string
>
Parameters
coinKey
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
get
Margin
Pool
Supply
Shares
getMarginPoolSupplyShares
(
coinKey
:
string
,
decimals
?:
number
)
:
Promise
<
string
>
Parameters
coinKey
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
get
Margin
Pool
Total
Borrow
getMarginPoolTotalBorrow
(
coinKey
:
string
,
decimals
?:
number
)
:
Promise
<
string
>
Parameters
coinKey
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
get
Margin
Pool
Total
Supply
getMarginPoolTotalSupply
(
coinKey
:
string
,
decimals
?:
number
)
:
Promise
<
string
>
Parameters
coinKey
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
get
Min
Borrow
Risk
Ratio
getMinBorrowRiskRatio
(
poolKey
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
Returns
Promise
<
number
>
get
Min
Withdraw
Risk
Ratio
getMinWithdrawRiskRatio
(
poolKey
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
Returns
Promise
<
number
>
get
Order
getOrder
(
poolKey
:
string
,
orderId
:
string
,
)
:
Promise
<
|
{
balance_manager_id
:
string
;
client_order_id
:
string
;
epoch
:
string
;
expire_timestamp
:
string
;
fee_is_deep
:
boolean
;
filled_quantity
:
string
;
order_deep_price
:
{
asset_is_base
:
boolean
;
deep_per_asset
:
string
}
;
order_id
:
string
;
quantity
:
string
;
status
:
number
;
}
|
null
,
>
Parameters
poolKey
:
string
orderId
:
string
Returns
Promise
<
|
{
balance_manager_id
:
string
;
client_order_id
:
string
;
epoch
:
string
;
expire_timestamp
:
string
;
fee_is_deep
:
boolean
;
filled_quantity
:
string
;
order_deep_price
:
{
asset_is_base
:
boolean
;
deep_per_asset
:
string
}
;
order_id
:
string
;
quantity
:
string
;
status
:
number
;
}
|
null
,
>
get
Order
Deep
Required
getOrderDeepRequired
(
poolKey
:
string
,
baseQuantity
:
number
|
bigint
,
price
:
number
|
bigint
,
)
:
Promise
<
OrderDeepRequiredResult
>
Parameters
poolKey
:
string
baseQuantity
:
number
|
bigint
price
:
number
|
bigint
Returns
Promise
<
OrderDeepRequiredResult
>
get
Order
Normalized
getOrderNormalized
(
poolKey
:
string
,
orderId
:
string
,
)
:
Promise
<
|
{
balance_manager_id
:
string
;
client_order_id
:
string
;
epoch
:
string
;
expire_timestamp
:
string
;
fee_is_deep
:
boolean
;
filled_quantity
:
string
;
isBid
:
boolean
;
normalized_price
:
string
;
order_deep_price
:
{
asset_is_base
:
boolean
;
deep_per_asset
:
string
}
;
order_id
:
string
;
quantity
:
string
;
status
:
number
;
}
|
null
,
>
Parameters
poolKey
:
string
orderId
:
string
Returns
Promise
<
|
{
balance_manager_id
:
string
;
client_order_id
:
string
;
epoch
:
string
;
expire_timestamp
:
string
;
fee_is_deep
:
boolean
;
filled_quantity
:
string
;
isBid
:
boolean
;
normalized_price
:
string
;
order_deep_price
:
{
asset_is_base
:
boolean
;
deep_per_asset
:
string
}
;
order_id
:
string
;
quantity
:
string
;
status
:
number
;
}
|
null
,
>
get
Orders
getOrders
(
poolKey
:
string
,
orderIds
:
string
[]
,
)
:
Promise
<
|
{
balance_manager_id
:
string
;
client_order_id
:
string
;
epoch
:
string
;
expire_timestamp
:
string
;
fee_is_deep
:
boolean
;
filled_quantity
:
string
;
order_deep_price
:
{
asset_is_base
:
boolean
;
deep_per_asset
:
string
}
;
order_id
:
string
;
quantity
:
string
;
status
:
number
;
}
[]
|
null
,
>
Parameters
poolKey
:
string
orderIds
:
string
[]
Returns
Promise
<
|
{
balance_manager_id
:
string
;
client_order_id
:
string
;
epoch
:
string
;
expire_timestamp
:
string
;
fee_is_deep
:
boolean
;
filled_quantity
:
string
;
order_deep_price
:
{
asset_is_base
:
boolean
;
deep_per_asset
:
string
}
;
order_id
:
string
;
quantity
:
string
;
status
:
number
;
}
[]
|
null
,
>
get
Pool
Deep
Price
getPoolDeepPrice
(
poolKey
:
string
)
:
Promise
<
PoolDeepPrice
>
Parameters
poolKey
:
string
Returns
Promise
<
PoolDeepPrice
>
get
Pool
Id
By
Assets
getPoolIdByAssets
(
baseType
:
string
,
quoteType
:
string
)
:
Promise
<
string
>
Parameters
baseType
:
string
quoteType
:
string
Returns
Promise
<
string
>
get
Pool
Liquidation
Reward
getPoolLiquidationReward
(
poolKey
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
Returns
Promise
<
number
>
get
Pool
Referral
Balances
getPoolReferralBalances
(
poolKey
:
string
,
referral
:
string
,
)
:
Promise
<
ReferralBalances
>
Parameters
poolKey
:
string
referral
:
string
Returns
Promise
<
ReferralBalances
>
get
Price
Info
Object
getPriceInfoObject
(
tx
:
Transaction
,
coinKey
:
string
)
:
Promise
<
string
>
Parameters
tx
:
Transaction
coinKey
:
string
Returns
Promise
<
string
>
get
Price
Info
Object
Age
getPriceInfoObjectAge
(
coinKey
:
string
)
:
Promise
<
number
>
Parameters
coinKey
:
string
Returns
Promise
<
number
>
get
Price
Info
Objects
getPriceInfoObjects
(
tx
:
Transaction
,
coinKeys
:
string
[]
,
)
:
Promise
<
Record
<
string
,
string
>
>
Parameters
tx
:
Transaction
coinKeys
:
string
[]
Returns
Promise
<
Record
<
string
,
string
>
>
get
Quantity
Out
getQuantityOut
(
poolKey
:
string
,
baseQuantity
:
number
|
bigint
,
quoteQuantity
:
number
|
bigint
,
)
:
Promise
<
QuantityOut
>
Parameters
poolKey
:
string
baseQuantity
:
number
|
bigint
quoteQuantity
:
number
|
bigint
Returns
Promise
<
QuantityOut
>
get
Quantity
Out
Input
Fee
getQuantityOutInputFee
(
poolKey
:
string
,
baseQuantity
:
number
|
bigint
,
quoteQuantity
:
number
|
bigint
,
)
:
Promise
<
QuantityOut
>
Parameters
poolKey
:
string
baseQuantity
:
number
|
bigint
quoteQuantity
:
number
|
bigint
Returns
Promise
<
QuantityOut
>
get
Quote
Margin
Pool
Id
getQuoteMarginPoolId
(
poolKey
:
string
)
:
Promise
<
string
>
Parameters
poolKey
:
string
Returns
Promise
<
string
>
get
Quote
Quantity
In
getQuoteQuantityIn
(
poolKey
:
string
,
targetBaseQuantity
:
number
|
bigint
,
payWithDeep
:
boolean
,
)
:
Promise
<
QuoteQuantityIn
>
Parameters
poolKey
:
string
targetBaseQuantity
:
number
|
bigint
payWithDeep
:
boolean
Returns
Promise
<
QuoteQuantityIn
>
get
Quote
Quantity
Out
getQuoteQuantityOut
(
poolKey
:
string
,
baseQuantity
:
number
|
bigint
,
)
:
Promise
<
QuoteQuantityOut
>
Parameters
poolKey
:
string
baseQuantity
:
number
|
bigint
Returns
Promise
<
QuoteQuantityOut
>
get
Quote
Quantity
Out
Input
Fee
getQuoteQuantityOutInputFee
(
poolKey
:
string
,
baseQuantity
:
number
|
bigint
,
)
:
Promise
<
QuoteQuantityOut
>
Parameters
poolKey
:
string
baseQuantity
:
number
|
bigint
Returns
Promise
<
QuoteQuantityOut
>
get
Target
Liquidation
Risk
Ratio
getTargetLiquidationRiskRatio
(
poolKey
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
Returns
Promise
<
number
>
get
User
Liquidation
Reward
getUserLiquidationReward
(
poolKey
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
Returns
Promise
<
number
>
get
User
Supply
Amount
getUserSupplyAmount
(
coinKey
:
string
,
supplierCapId
:
string
,
decimals
?:
number
,
)
:
Promise
<
string
>
Parameters
coinKey
:
string
supplierCapId
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
get
User
Supply
Shares
getUserSupplyShares
(
coinKey
:
string
,
supplierCapId
:
string
,
decimals
?:
number
,
)
:
Promise
<
string
>
Parameters
coinKey
:
string
supplierCapId
:
string
decimals
:
number
= 6
Returns
Promise
<
string
>
is
Deepbook
Pool
Allowed
isDeepbookPoolAllowed
(
coinKey
:
string
,
deepbookPoolId
:
string
)
:
Promise
<
boolean
>
Parameters
coinKey
:
string
deepbookPoolId
:
string
Returns
Promise
<
boolean
>
is
Pool
Enabled
For
Margin
isPoolEnabledForMargin
(
poolKey
:
string
)
:
Promise
<
boolean
>
Parameters
poolKey
:
string
Returns
Promise
<
boolean
>
locked
Balance
lockedBalance
(
poolKey
:
string
,
balanceManagerKey
:
string
,
)
:
Promise
<
LockedBalances
>
Parameters
poolKey
:
string
balanceManagerKey
:
string
Returns
Promise
<
LockedBalances
>
mid
Price
midPrice
(
poolKey
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
Returns
Promise
<
number
>
pool
Book
Params
poolBookParams
(
poolKey
:
string
)
:
Promise
<
PoolBookParams
>
Parameters
poolKey
:
string
Returns
Promise
<
PoolBookParams
>
pool
Id
poolId
(
poolKey
:
string
)
:
Promise
<
string
>
Parameters
poolKey
:
string
Returns
Promise
<
string
>
pool
Referral
Multiplier
poolReferralMultiplier
(
poolKey
:
string
,
referral
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
referral
:
string
Returns
Promise
<
number
>
pool
Trade
Params
poolTradeParams
(
poolKey
:
string
)
:
Promise
<
PoolTradeParams
>
Parameters
poolKey
:
string
Returns
Promise
<
PoolTradeParams
>
pool
Trade
Params
Next
poolTradeParamsNext
(
poolKey
:
string
)
:
Promise
<
PoolTradeParams
>
Parameters
poolKey
:
string
Returns
Promise
<
PoolTradeParams
>
quorum
quorum
(
poolKey
:
string
)
:
Promise
<
number
>
Parameters
poolKey
:
string
Returns
Promise
<
number
>
registered
Pool
registeredPool
(
poolKey
:
string
)
:
Promise
<
boolean
>
Parameters
poolKey
:
string
Returns
Promise
<
boolean
>
stable
Pool
stablePool
(
poolKey
:
string
)
:
Promise
<
boolean
>
Parameters
poolKey
:
string
Returns
Promise
<
boolean
>
vault
Balances
vaultBalances
(
poolKey
:
string
)
:
Promise
<
VaultBalances
>
Parameters
poolKey
:
string
Returns
Promise
<
VaultBalances
>
whitelisted
whitelisted
(
poolKey
:
string
)
:
Promise
<
boolean
>
Parameters
poolKey
:
string
Returns
Promise
<
boolean
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
balance
Manager
deep
Book
deep
Book
Admin
flash
Loans
governance
margin
Admin
margin
Liquidations
margin
Maintainer
margin
Manager
margin
Pool
margin
Registry
margin
TPSL
pool
Proxy
Methods
account
account
Exists
account
Open
Orders
balance
Manager
Referral
Owner
balance
Manager
Referral
Pool
Id
can
Place
Limit
Order
can
Place
Market
Order
check
Limit
Order
Params
check
Manager
Balance
check
Manager
Balances
With
Address
check
Manager
Balance
With
Address
check
Market
Order
Params
decode
Order
Id
get
Account
Order
Details
get
Allowed
Maintainers
get
Allowed
Pause
Caps
get
Balance
Manager
Ids
get
Balance
Manager
Referral
Id
get
Base
Margin
Pool
Id
get
Base
Quantity
In
get
Base
Quantity
Out
get
Base
Quantity
Out
Input
Fee
get
Conditional
Order
Ids
get
Highest
Trigger
Below
Price
get
Level2
Range
get
Level2
Ticks
From
Mid
get
Liquidation
Risk
Ratio
get
Lowest
Trigger
Above
Price
get
Margin
Manager
Assets
get
Margin
Manager
Balance
Manager
Id
get
Margin
Manager
Balances
get
Margin
Manager
Base
Balance
get
Margin
Manager
Borrowed
Base
Shares
get
Margin
Manager
Borrowed
Quote
Shares
get
Margin
Manager
Borrowed
Shares
get
Margin
Manager
Debts
get
Margin
Manager
Deep
Balance
get
Margin
Manager
Deepbook
Pool
get
Margin
Manager
Has
Base
Debt
get
Margin
Manager
Ids
For
Owner
get
Margin
Manager
Margin
Pool
Id
get
Margin
Manager
Owner
get
Margin
Manager
Quote
Balance
get
Margin
Manager
State
get
Margin
Manager
States
get
Margin
Pool
Borrow
Shares
get
Margin
Pool
Id
get
Margin
Pool
Interest
Rate
get
Margin
Pool
Last
Update
Timestamp
get
Margin
Pool
Max
Utilization
Rate
get
Margin
Pool
Min
Borrow
get
Margin
Pool
Protocol
Spread
get
Margin
Pool
Supply
Cap
get
Margin
Pool
Supply
Shares
get
Margin
Pool
Total
Borrow
get
Margin
Pool
Total
Supply
get
Min
Borrow
Risk
Ratio
get
Min
Withdraw
Risk
Ratio
get
Order
get
Order
Deep
Required
get
Order
Normalized
get
Orders
get
Pool
Deep
Price
get
Pool
Id
By
Assets
get
Pool
Liquidation
Reward
get
Pool
Referral
Balances
get
Price
Info
Object
get
Price
Info
Object
Age
get
Price
Info
Objects
get
Quantity
Out
get
Quantity
Out
Input
Fee
get
Quote
Margin
Pool
Id
get
Quote
Quantity
In
get
Quote
Quantity
Out
get
Quote
Quantity
Out
Input
Fee
get
Target
Liquidation
Risk
Ratio
get
User
Liquidation
Reward
get
User
Supply
Amount
get
User
Supply
Shares
is
Deepbook
Pool
Allowed
is
Pool
Enabled
For
Margin
locked
Balance
mid
Price
pool
Book
Params
pool
Id
pool
Referral
Multiplier
pool
Trade
Params
pool
Trade
Params
Next
quorum
registered
Pool
stable
Pool
vault
Balances
whitelisted
Documentation
Loading...
DeepBookClient class for managing DeepBook operations.