package
module
Version:
v0.0.1
Opens a new window with list of versions in this module.
Published: Jun 18, 2020
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
CalculateLocked calculates locked according to order side.
Engine is core structure for matching engine.
New creates new order-book engine.
Cancel removes order from order-book.
Match matches upcoming order with orders in order-book.
Print prints order-book into io.Writer.
String returns orders from order-book.
Returns list of buy orders, then sell orders.
Kind of order, either "Market" or "Limit".
New types of order can be added.
const (
KindMarket Kind = "market"
KindLimit Kind = "limit"
)
Less compares two orders by price & ID, respects order Side.
Used in order-book for sorting btree of orders.
Side of order, either "sell" or "buy".
const (
SideSell Side = "sell"
SideBuy Side = "buy"
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.