sequence

package
v0.0.0-...-54421ad Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2019 License: BSD-3-Clause Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type SequenceService

type SequenceService struct {
	sync.Mutex
	// 没支股票对应一个 优先队列[买,卖]
	PlateBuy  map[string]pq.PriorityQueue
	PlateSale map[string]pq.RPriorityQueue
	// contains filtered or unexported fields
}

为每支股票维护两个队列,

func (*SequenceService) AddOrder

func (this *SequenceService) AddOrder(order_real model.Tb_order_real) error

添加訂單.

为订单中的股票创建买卖队列

func (*SequenceService) DelOrder

func (this *SequenceService) DelOrder(orderMsg message.MsgRevokeOrder) error

撤單

func (*SequenceService) Match

func (this *SequenceService) Match(
	stock_code string, price float64, count int) (err error)

撮合 买卖 订单 stock_code: 股票代码

Jump to

Keyboard shortcuts

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