Files
2019-11-15 00:47:48 +00:00

3.0 KiB
Raw Permalink Blame History

@hanzo/matching-engine › Globals › "Trade" › Trade

Class: Trade

Hierarchy

  • Trade

Index

Constructors

Properties

Constructors

constructor

+ new Trade(fillQuantity: Decimal, fillPrice: Decimal, newOrders: Order[], matchedOrders: Order[], rejectedOrders: Order[], executedAt: number): Trade

Defined in Trade.ts:42

trade constructor

Parameters:

Name Type Default Description
fillQuantity Decimal - quantity that the trade was filled for
fillPrice Decimal - price that the trade was filled out
newOrders Order[] [] any orders generated by this trade (usually due to partial fills)
matchedOrders Order[] [] pair of orders that were matched
rejectedOrders Order[] [] any orders that were generated but could not be submitted
executedAt number time().valueOf() time of trade execution, defaults to unix time

Returns: Trade

Properties

executedAt

• executedAt: number

Defined in Trade.ts:42

unix time of execution


fillPrice

• fillPrice: Decimal

Defined in Trade.ts:16

fill price


fillQuantity

• fillQuantity: Decimal

Defined in Trade.ts:21

fill quantity


id

• id: string = uuid.v4()

Defined in Trade.ts:11

unique trade id


matchedOrders

• matchedOrders: Order[]

Defined in Trade.ts:32

bid/ask order pair filled


newOrders

• newOrders: Order[]

Defined in Trade.ts:27

orders created by this trade execution (usually partial fill of a market order)


rejectedOrders

• rejectedOrders: Order[]

Defined in Trade.ts:37

rejected unfillable orders