report

package
v0.0.0-...-8fb26ab Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder[T instr.Instrument] struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder[T instr.Instrument](
	instrument T,
	exchange exchange.Exchange,
	clientOrderID string,
	orderID string,
	price float64,
	qty float64,
	side side.OrderSide,
	orderStatus ordstatus.OrderStatus,
	orderType ordtypes.OrderType,
	timeInForce tif.TimeInForce,
	transactTime time.Time) *Builder[T]

func (*Builder[T]) Build

func (b *Builder[T]) Build() *ExecutionReport[T]

func (*Builder[T]) SetAccount

func (b *Builder[T]) SetAccount(account string) *Builder[T]

func (*Builder[T]) SetAvgPrice

func (b *Builder[T]) SetAvgPrice(avgPrice float64) *Builder[T]

func (*Builder[T]) SetCumQty

func (b *Builder[T]) SetCumQty(cumQty float64) *Builder[T]

func (*Builder[T]) SetErrorReason

func (b *Builder[T]) SetErrorReason(errorReason string) *Builder[T]

func (*Builder[T]) SetFilledQty

func (b *Builder[T]) SetFilledQty(filledQty float64) *Builder[T]

func (*Builder[T]) SetLastPrice

func (b *Builder[T]) SetLastPrice(lastPrice float64) *Builder[T]

func (*Builder[T]) SetLeavesQty

func (b *Builder[T]) SetLeavesQty(leavesQty float64) *Builder[T]

func (*Builder[T]) SetRejectReason

func (b *Builder[T]) SetRejectReason(rejectReason string) *Builder[T]

func (*Builder[T]) SetTotalFee

func (b *Builder[T]) SetTotalFee(totalFee float64) *Builder[T]

func (*Builder[T]) SetVersion

func (b *Builder[T]) SetVersion(version uint8) *Builder[T]

type ExecutionReport

type ExecutionReport[T instr.Instrument] struct {
	Instrument    T                     // Instrument of the order.
	Exchange      exchange.Exchange     // Exchange of the order.
	ClientOrderID string                // Unique ID for the order assigned by the client (us).
	OrderID       string                // Unique ID for the order assigned by the exchange.
	Price         float64               // Price of the order.
	Qty           float64               // Qty of the order.
	Side          side.OrderSide        // Side of the order.
	OrderStatus   ordstatus.OrderStatus // OrderStatus of the order.
	OrderType     ordtypes.OrderType    // Type of the order.
	TimeInForce   tif.TimeInForce       // Time in force of the order.
	TransactTime  time.Time             // Transact time of the order
	Account       *string               // Account of the order (optional).
	TotalFee      *float64              // Total fee of the order (optional).
	FilledQty     *float64              // Qty of the order that has been filled.
	LeavesQty     *float64              // Leaves qty of the order (optional).
	CumQty        *float64              // Cumulative qty of the order (optional).
	AvgPrice      *float64              // Average price of the order (optional).
	LastPrice     *float64              // Last price of the order (optional).
	Version       *uint8                // Exchange version of the order (optional).
	RejectReason  *string               // Reason for the order being rejected (optional).
	ErrorReason   *string               // Reason for the order being errored (optional).
}

Note: Optionals are indicated as pointers

Jump to

Keyboard shortcuts

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