Documentation ¶
Index ¶
- func ComparePrefix(p1, p2 *order.Prefix) error
- func CompareTrade(t1, t2 *order.Trade) error
- func CompareUserMatch(m1, m2 *order.UserMatch) error
- func MustCompareCancelOrders(t testKiller, c1, c2 *order.CancelOrder)
- func MustCompareLimitOrders(t testKiller, l1, l2 *order.LimitOrder)
- func MustCompareMarketOrders(t testKiller, m1, m2 *order.MarketOrder)
- func MustCompareOrders(t testKiller, o1, o2 order.Order)
- func MustComparePrefix(t testKiller, p1, p2 *order.Prefix)
- func MustCompareTrade(t testKiller, t1, t2 *order.Trade)
- func MustCompareUserMatch(t testKiller, m1, m2 *order.UserMatch)
- func NextAccount() account.AccountID
- func RandomAddress() string
- func RandomCancelOrder() (*order.CancelOrder, order.Preimage)
- func RandomCommitment() (com order.Commitment)
- func RandomLimitOrder() (*order.LimitOrder, order.Preimage)
- func RandomMarketOrder() (*order.MarketOrder, order.Preimage)
- func RandomMatchID() order.MatchID
- func RandomOrderID() order.OrderID
- func RandomPreimage() (pi order.Preimage)
- func RandomUserMatch() *order.UserMatch
- func WriteCancelOrder(writer *Writer, targetOrderID order.OrderID, timeOffset int64) (*order.CancelOrder, order.Preimage)
- func WriteLimitOrder(writer *Writer, rate, lots uint64, force order.TimeInForce, timeOffset int64) (*order.LimitOrder, order.Preimage)
- func WriteMarketOrder(writer *Writer, lots uint64, timeOffset int64) (*order.MarketOrder, order.Preimage)
- type Market
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePrefix ¶
ComparePrefix compares the prefixes field-by-field and returns an error if a mismatch is found.
func CompareTrade ¶
CompareTrade compares the MarketOrders field-by-field and returns an error if a mismatch is found.
func CompareUserMatch ¶
CompareUserMatch compares the UserMatches field-by-field and returns an error if a mismatch is found.
func MustCompareCancelOrders ¶
func MustCompareCancelOrders(t testKiller, c1, c2 *order.CancelOrder)
MustCompareCancelOrders compares the CancelOrders field-by-field and calls the Fatalf method on the supplied testKiller if a mismatch is encountered.
func MustCompareLimitOrders ¶
func MustCompareLimitOrders(t testKiller, l1, l2 *order.LimitOrder)
MustCompareUserMatch compares the LimitOrders field-by-field and calls the Fatalf method on the supplied testKiller if a mismatch is encountered.
func MustCompareMarketOrders ¶
func MustCompareMarketOrders(t testKiller, m1, m2 *order.MarketOrder)
MustCompareMarketOrders compares the MarketOrders field-by-field and calls the Fatalf method on the supplied testKiller if a mismatch is encountered.
func MustCompareOrders ¶
MustCompareOrders compares the Orders field-by-field and calls the Fatalf method on the supplied testKiller if a mismatch is encountered.
func MustComparePrefix ¶
MustComparePrefix compares the Prefix field-by-field and calls the Fatalf method on the supplied testKiller if a mismatch is encountered.
func MustCompareTrade ¶
MustCompareTrade compares the MarketOrders field-by-field and calls the Fatalf method on the supplied testKiller if a mismatch is encountered.
func MustCompareUserMatch ¶
MustCompareUserMatch compares the UserMatches field-by-field and calls the Fatalf method on the supplied testKiller if a mismatch is encountered.
func RandomCancelOrder ¶
func RandomCancelOrder() (*order.CancelOrder, order.Preimage)
RandomCancelOrder creates a random cancel order with a random writer.
func RandomCommitment ¶
func RandomCommitment() (com order.Commitment)
RandomCommitment creates a random order commitment. Use RandomPreimage followed by Preimage.Commit() if you require a matching commitment.
func RandomLimitOrder ¶
func RandomLimitOrder() (*order.LimitOrder, order.Preimage)
RandomLimitOrder creates a random limit order with a random writer.
func RandomMarketOrder ¶
func RandomMarketOrder() (*order.MarketOrder, order.Preimage)
RandomMarketOrder creates a random market order with a random writer.
func RandomPreimage ¶
RandomPreimage creates a random order preimage.
func RandomUserMatch ¶
RandomUserMatch creates a random UserMatch.
func WriteCancelOrder ¶
func WriteCancelOrder(writer *Writer, targetOrderID order.OrderID, timeOffset int64) (*order.CancelOrder, order.Preimage)
WriteCancelOrder creates a cancel order with the specified order ID.
func WriteLimitOrder ¶
func WriteLimitOrder(writer *Writer, rate, lots uint64, force order.TimeInForce, timeOffset int64) (*order.LimitOrder, order.Preimage)
WriteLimitOrder creates a limit order with the specified writer and order values.
func WriteMarketOrder ¶
func WriteMarketOrder(writer *Writer, lots uint64, timeOffset int64) (*order.MarketOrder, order.Preimage)
WriteMarketOrder creates a market order with the specified writer and quantity.