Documentation
¶
Overview ¶
Package dex provides GPU-accelerated DEX operations.
Uses dex_swap.* kernels from backend plugins for order matching and atomic swap execution.
Index ¶
- Variables
- func BatchMatch(orderBooks [][]Order, incomingBatches [][]Order) ([][]Trade, error)
- func MatchOrders(bids, asks []Order, incoming []Order) ([]Trade, []Order, error)
- func Swap(makerAsset, takerAsset []byte, makerAmount, takerAmount uint64, ...) ([]byte, error)
- type Level
- type Order
- type OrderType
- type Side
- type Trade
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BatchMatch ¶
BatchMatch matches multiple order batches in parallel. Useful for high-frequency trading scenarios.
func MatchOrders ¶
MatchOrders matches incoming orders against an order book. Uses GPU acceleration for parallel price-time priority matching. Returns executed trades and updated orders.
Types ¶
type Order ¶
type Order struct {
ID uint64
UserID uint64
Price uint64 // Fixed-point Q32.32 or similar
Quantity uint64
Remaining uint64
Timestamp uint64
Side Side
Type OrderType
}
Order represents a trading order.
Click to show internal directories.
Click to hide internal directories.