public class OrderBook extends Object
|Constructor and Description|
Create an order book.
|Modifier and Type||Method and Description|
Cancel a quantity of an order in this order book.
Enter an order to this order book.
public OrderBook(OrderBookListener listener)
listener- a listener for outbound events from the order book
public void enter(long orderId, Side side, long price, long size)
The incoming order is first matched against resting orders in this order book. This operation results in zero or more Match events.
If the remaining quantity is not zero after the matching operation, the remaining quantity is added to this order book and an Add event is triggered.
If the order identifier is known, do nothing.
orderId- an order identifier
side- the side
price- the limit price
size- the size
public void cancel(long orderId, long size)
A Cancel event is triggered.
If the order identifier is unknown, do nothing.
orderId- the order identifier
size- the new size
Copyright © 2017. All rights reserved.