pricefeed

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTestMarketPriceUpdates added in v0.3.0

func GetTestMarketPriceUpdates(n int) (indexPrices []*pricefeedapi.MarketPriceUpdate)

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