pricefeed

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExchangeServer

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

func NewExchangeServer

func NewExchangeServer() *ExchangeServer

NewExchangeServer creates a new ExchangeServer that can be used to fake price data from exchanges. This server responds queries for the test exchange built into the pricefeed daemon and for bitfinex. It is appropriate to run locally or on containers.

func (*ExchangeServer) CleanUp

func (p *ExchangeServer) CleanUp() error

CleanUp shuts down the server and validates that it shut down correctly.

func (*ExchangeServer) GetPrice

func (p *ExchangeServer) GetPrice(marketId pricefeed.MarketId) float64

func (*ExchangeServer) SetPrice

func (p *ExchangeServer) SetPrice(marketId pricefeed.MarketId, price float64)

Jump to

Keyboard shortcuts

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