testhelper

package
v1.62.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllMarkets added in v1.61.0

func AllMarkets() types.MarketMap

func AssertOrdersPriceSide

func AssertOrdersPriceSide(t *testing.T, asserts []PriceSideAssert, orders []types.SubmitOrder)

AssertOrdersPriceSide asserts the orders with the given price and side (slice)

func AssertOrdersPriceSideQuantity

func AssertOrdersPriceSideQuantity(
	t *testing.T, asserts []PriceSideQuantityAssert, orders []types.SubmitOrder,
)

AssertOrdersPriceSide asserts the orders with the given price and side (slice)

func AssertOrdersPriceSideQuantityFromText added in v1.61.0

func AssertOrdersPriceSideQuantityFromText(
	t *testing.T, text string, orders []types.SubmitOrder,
)

func Balance added in v1.61.0

func Balance(currency string, available fixedpoint.Value) types.Balance

Balance returns a balance object with the given currency and available amount

func BalancesFromText added in v1.61.0

func BalancesFromText(str string) types.BalanceMap

func Market added in v1.60.2

func Market(symbol string) types.Market

func Number

func Number(a interface{}) fixedpoint.Value

func PriceVolumeSlice added in v1.60.2

func PriceVolumeSlice(values ...fixedpoint.Value) (slice types.PriceVolumeSlice)

func PriceVolumeSliceFromText added in v1.60.2

func PriceVolumeSliceFromText(str string) (slice types.PriceVolumeSlice)

func Ticker added in v1.61.0

func Ticker(symbol string) types.Ticker

Types

type PriceSideAssert

type PriceSideAssert struct {
	Price fixedpoint.Value
	Side  types.SideType
}

type PriceSideQuantityAssert

type PriceSideQuantityAssert struct {
	Price    fixedpoint.Value
	Side     types.SideType
	Quantity fixedpoint.Value
}

func ParsePriceSideQuantityAssertions added in v1.61.0

func ParsePriceSideQuantityAssertions(text string) []PriceSideQuantityAssert

Jump to

Keyboard shortcuts

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