exchange

package
v0.0.0-...-7e8c8c6 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: GPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var App myApplication
View Source
var TheExchange exchange

Functions

func BookServer

func BookServer(ws *websocket.Conn)

func GetBook

func GetBook(symbol string) *Book

func GetLatestBook

func GetLatestBook(instrument Instrument) *Book

func NewGrpcServer

func NewGrpcServer() protocol.ExchangeServer

func StartWebServer

func StartWebServer(addr string)

Types

type BookRequest

type BookRequest struct {
	Symbol   string
	Sequence uint64
}

type MarketEvent

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

type Packet

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

type PacketHistory

type PacketHistory struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

type SPSC

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

SPSC is a lock-free queue for []byte (single producer, single consumer), used to recycle marketdata multicast packets

type Statistics

type Statistics struct {
	Symbol     string
	BidQty     Fixed
	BidPrice   Fixed
	AskQty     Fixed
	AskPrice   Fixed
	Volume     Fixed
	High       Fixed
	Low        Fixed
	HasHighLow bool
}

Jump to

Keyboard shortcuts

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