DeepBookClient class
Methods
batchCancelOrder ({required String poolId , required List <String > orderIds })
→ Future <TransactionBlock >
Batch cancel order.
cancelAllOrders (String poolId )
→ Future <TransactionBlock >
Cancel all limit orders under a certain account capacity.
cancelOrder ({required String poolId , required int orderId })
→ Future <TransactionBlock >
Cancel an order.
cleanUpExpiredOrders ({required String poolId , required List <String > orderIds , required List <String > orderOwners })
→ Future <TransactionBlock >
poolId Object id of pool, created after invoking createPool.
createAccount ({String ? currentAddress , TransactionBlock? txb })
→ TransactionBlock
Create and Transfer custodian account to user's currentAddress
createAccountCap (TransactionBlock txb )
→ TransactionResult
Create Account Cap
createChildAccountCap ({String ? currentAddress , String ? accountCap })
→ TransactionBlock
Create and Transfer custodian account to user's currentAddress.
accountCap Object id of Account Capacity under user address, created after invoking createAccount
createCustomizedPool (String baseAssetType , String quoteAssetType , int tickSize , int lotSize , int takerFeeRate , int makerRebateRate )
→ TransactionBlock
Create pool for trading pair.
createPool (String baseAssetType , String quoteAssetType , int tickSize , int lotSize )
→ TransactionBlock
Create pool for trading pair.
deposit ({required String poolId , String ? coinId , int ? quantity })
→ Future <TransactionBlock >
Construct transaction block for depositing asset coinId into a pool poolId.
getAllPools ({String ? cursor , int ? limit , bool descendingOrder = false })
→ Future <PaginatedPoolSummary >
Returns paginated list of pools created in DeepBook by querying for the PoolCreated event.
getCoinType (String coinId )
→ Future <String ? >
getLevel2BookStatus ({required String poolId , required int lowerPrice , required int higherPrice , required OrderType side })
→ Future
Get level2 book status.
getMarketPrice (String poolId )
→ Future <MarketPrice >
Get the market price {bestBidPrice, bestAskPrice} by pool id poolId.
getOrderStatus ({required String poolId , required int orderId , String ? accountCap })
→ Future <Order ? >
Get the order status by pool id poolId and order id orderId
getPoolInfo (String poolId )
→ Future <PoolSummary >
Fetch metadata for a pool poolId.
getPoolTypeArgs (String poolId )
→ Future <List <String > >
getUserPosition ({required String poolId , String ? accountCap })
→ Future <UserPosition >
Get the base and quote token in custodian account by poolId and accountCap.
listOpenOrders ({required String poolId , String ? accountCap })
→ Future <List <Order > >
Get the open orders of the current user.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
placeLimitOrder ({required String poolId , required int price , required int quantity , required OrderType orderType , int ? expirationTimestamp , LimitOrderType restriction = LimitOrderType.NO_RESTRICTION , int ? clientOrderId , SelfMatchingPreventionStyle selfMatchingPrevention = SelfMatchingPreventionStyle.CANCEL_OLDEST })
→ Future <TransactionBlock >
Place a limit order
placeMarketOrder ({required String accountCap , required String poolId , required int quantity , required OrderType orderType , String ? baseCoin , String ? quoteCoin , int ? clientOrderId , String ? recipientAddress , TransactionBlock? txb })
→ Future <TransactionBlock >
Place a market order.
setAccountCap (String cap )
→ void
cap set the account cap for interacting with DeepBook
swapExactBaseForQuote ({required String poolId , required dynamic tokenObjectIn , required int amountIn , required String currentAddress , int ? clientOrderId , TransactionBlock? txb })
→ Future <TransactionBlock >
Swap exact base for quote.
swapExactQuoteForBase ({required String poolId , required dynamic tokenObjectIn , required int amountIn , required String currentAddress , int ? clientOrderId , TransactionBlock? txb })
→ Future <TransactionBlock >
Swap exact quote for base.
toString ()
→ String
A string representation of this object.
inherited
withdraw (String poolId , int quantity , AssetType assetType , [String ? recipientAddress ])
→ Future <TransactionBlock >
Construct transaction block for withdrawing the assetType (base or quote) of the amount
of quantity asset from a pool poolId to recipientAddress.