3.6 KiB
@hanzo/matching-engine › Globals › "Order" › Order
Class: Order
represents an order that's put in a book
Hierarchy
- Order
Index
Constructors
Properties
Methods
Constructors
constructor
+ new Order(externalId: string, side: OrderSide, type: OrderType, quantity: number | string | Decimal, price: number | string | Decimal, fillQuantity: number | string | Decimal, createdAt: number): Order
Defined in Order.ts:118
order constructor
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
externalId |
string | - | id of order from another system |
side |
OrderSide | - | - |
type |
OrderType | - | type of this order |
quantity |
number | string | Decimal | 0 | quantity involved in this order |
price |
number | string | Decimal | 0 | price of this order |
fillQuantity |
number | string | Decimal | 0 | - |
createdAt |
number | time().valueOf() | - |
Returns: Order
Properties
createdAt
• createdAt: number
Defined in Order.ts:118
unix creation time
externalId
• externalId: string
Defined in Order.ts:83
id from an external system
fillQuantity
• fillQuantity: Decimal
Defined in Order.ts:113
amount filled
id
• id: string = uuid.v4()
Defined in Order.ts:78
unique order id
price
• price: Decimal
Defined in Order.ts:103
bid/ask price
quantity
• quantity: Decimal
Defined in Order.ts:108
order size
side
• side: OrderSide
Defined in Order.ts:88
side of the order
status
• status: OrderStatus = OrderStatus.UNFILLED
Defined in Order.ts:98
status of the order
type
• type: OrderType
Defined in Order.ts:93
type of the order
Methods
clone
▸ clone(): Order
Defined in Order.ts:140
Returns: Order
return a clone of this order