Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultDepthUpdateBufferSize is the default capacity for depth update ring buffers
DefaultDepthUpdateBufferSize = 100
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
Actor is the orderbook actor that maintains per-symbol order books, writes state to Cache, and requests snapshots via MsgBus commands.
func (*Actor) RegisterSymbol ¶
RegisterSymbol registers a symbol with its precision info. Creates a new SymbolBook in WaitForSnapshot state.
type DepthUpdateBuffer ¶
type DepthUpdateBuffer struct {
PreviousDepthID int
FirstDepthID int
FinalDepthID int
Timestamp uint64
Bids []common.PriceLevel
Asks []common.PriceLevel
}
DepthUpdateBuffer holds a buffered depth update during sync. For Binance depth updates:
- PreviousDepthID = U - 1 (one before first update ID)
- FirstDepthID = U (first update ID in event)
- FinalDepthID = u (final update ID in event)
type OrderbookConfig ¶
type OrderbookConfig struct {
Symbol string `yaml:"symbol"` // Universal ticker of the symbol to track
}
OrderbookConfig contains configuration for a single orderbook actor instance.
type SymbolBook ¶
type SymbolBook struct {
// contains filtered or unexported fields
}
SymbolBook maintains the orderbook state for a single symbol. Uses btree.Map keyed by PriceTick for both bids and asks.
Click to show internal directories.
Click to hide internal directories.