Features
The OrderBook component is commonly used in conjuction with theuseOrderBookStream hook and offers the following features:
- Display of asks/bids/middlePrice/lastPrice data.
- Support for depth merging.
- Automatic adaptation to changes in height.
Usage
APIs
level
- Type:
number - Required: false
cellHeight
- Type:
number - Required: false
base
- Type:
API.SymbolExt - Required: true
useSymbolsInfo hook.
quote
- Type:
API.SymbolExt - Required: true
useSymbolsInfo hook.
onItemClick
- Type:
(item: OrderBookItem) => void - Required: false
The following parameters/functions are recommended to be obtained through the
useOrderEntry hook.asks
- Type:
OrderBookItem[] - Required: true
bids
- Type:
OrderBookItem[] - Required: true
markPrice
- Type:
number - Required: true
lastPrice
- Type:
number - Required: true
depth
- Type:
number - Required: true
activeDepth
- Type:
number - Required: true
isLoading
- Type:
boolean - Required: true
onDepthChange
- Type:
(depth: number) => void - Required: false