services

package
v0.0.0-...-cc8f6e5 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExchangeService

func NewExchangeService(
	logger log.Logger,
	dealQueue DealQueue,
	tickService exchange.TickService,
	tickers []string,
	interval time.Duration,
) exchange.ExchangeService

NewExchangeService creates new exchange service.

func NewTickService

func NewTickService(logger log.Logger) exchange.TickService

NewTickService creates new tick service.

Types

type DealQueue

type DealQueue interface {
	Add(deal exchange.Deal)
	Get(ticker string, price float64) []exchange.Deal
	Delete(dealID int64) bool
}

DealQueue queue of deals.

Jump to

Keyboard shortcuts

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