package
Version:
v0.0.0-...-64716ca
Opens a new window with list of versions in this module.
Published: Apr 1, 2020
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
NewConsumer creates the consumer
NewProducer creates the producer
type Order struct {
Amount uint64 `json:"amount"`
Price uint64 `json:"price"`
ID string `json:"id"`
Side int8 `json:"side"`
}
Order type
type OrderBook struct {
BuyOrders []Order
SellOrders []Order
}
OrderBook type
Process an order and return generated trades before adding amount to market
type Trade struct {
TakerOrderID string `json:"taker_order_id"`
MakerOrderID string `json:"maker_order_id"`
Amount uint64 `json:"amount"`
Price uint64 `json:"price"`
}
Trade type
Source Files
¶
Click to show internal directories.
Click to hide internal directories.