testhelper

package
v1.63.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 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,
)

AssertOrdersPriceSideQuantity asserts the orders with the given price, side and quantity

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 CatchMatcher added in v1.63.0

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

func Catch added in v1.63.0

func Catch(f func(x any)) *CatchMatcher

func (*CatchMatcher) Matches added in v1.63.0

func (m *CatchMatcher) Matches(x interface{}) bool

func (*CatchMatcher) String added in v1.63.0

func (m *CatchMatcher) String() string

type OrderMatcher added in v1.63.0

type OrderMatcher struct {
	Order types.Order
}

func MatchOrder added in v1.63.0

func MatchOrder(o types.Order) *OrderMatcher

func (*OrderMatcher) Matches added in v1.63.0

func (m *OrderMatcher) Matches(x interface{}) bool

func (*OrderMatcher) String added in v1.63.0

func (m *OrderMatcher) String() string

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