orderbook

package
v0.0.0-...-f2cd14d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2016 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

A simulated order book bid offer matching by bloomberg pricefeed quotes

this is to give our sell side FIX engine simulate a false feel of reality,
so as to support MARKET or LIMIT orders

Index

Constants

This section is empty.

Variables

View Source
var (
	//Public Variables
	PXMessageBus    *nats.Conn
	OrderUpdateChan chan *ems.Order
)

Functions

func Close

func Close()

func DoTrade

func DoTrade(order *ems.Order, quantity float64, price float64)

func RegisterOrder

func RegisterOrder(order *ems.Order)

func UnRegisterOrder

func UnRegisterOrder(order *ems.Order)

Types

type OrderBook

type OrderBook struct {
	OrdersList map[int32]*ems.Order
	Symbol     string
	Quote      *marketdata.Quote
	Subscriber *nats.Subscription
}

func (*OrderBook) ConstrucOrderBookLinkedList

func (m *OrderBook) ConstrucOrderBookLinkedList() (*QuoteBand, *QuoteBand)

func (*OrderBook) ProcessOrderBookUpdate

func (m *OrderBook) ProcessOrderBookUpdate(triggerQuote *marketdata.Quote)

type QuoteBand

type QuoteBand struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL