book
Class used for managing the first 10 levels of the current book
Example:
onInit() {
gBook = new v9.book(); //gBook must be a global var defined outside of your feed
}
//Right now, it is necessary to include the following lines in your feed's onEvent function
onEvent(pSymbol, pEvent, pRealTime) {
pEvent.channelReset.type;
pEvent.orderBook.orderID;
pEvent.orderBook.price;
pEvent.orderBook.quantity;
pEvent.orderBook.type;
pEvent.orderBook.action;
gBook.onEvent(pEvent);
}
Constructor Summary
Public Constructor | ||
public |
Member Summary
Method Summary
Public Methods | ||
public | Deletes the order from the ask levels of the current order book that matches the price and quantity provided | |
public | Deletes the order from the bid levels of the current order book that matches the price and quantity provided | |
public | Returns a specific ask level of the book as an Object | |
public | Returns a specific ask level of the book as an Object | |
public | Inserts the price and quantity provided into the ask levels of the current order book | |
public | Inserts the price and quantity provided into the bid levels of the current order book | |
public | Returns the current ask levels of the book as a list | |
public | Returns the current bid levels of the book as a list | |
public | BookTalk() Prints both sides of the current order book |
Public Constructors
public constructor() source
Private Members
private fListLevA: * source
Object used manage the internal list of ask levels
private fListLevB: * source
Object used manage the internal list of bid levels
Public Methods
public BookDeleA(quantity: number, price: number) source
Deletes the order from the ask levels of the current order book that matches the price and quantity provided
public BookDeleB(quantity: number, price: number) source
Deletes the order from the bid levels of the current order book that matches the price and quantity provided
public BookItemA(cnt: number): {"price": *, "quantity": *}: Object source
Returns a specific ask level of the book as an Object
Params:
Name | Type | Attribute | Description |
cnt | number | Level (Tentatively 1 through 10) |
Return:
{"price": *, "quantity": *} |
public BookItemB(cnt: number): {"price": *, "quantity": *}: Object source
Returns a specific ask level of the book as an Object
Params:
Name | Type | Attribute | Description |
cnt | number | Level (Tentatively 1 through 10) |
Return:
{"price": *, "quantity": *} |
public BookPlusA(quantity: number, price: number) source
Inserts the price and quantity provided into the ask levels of the current order book
public BookPlusB(quantity: number, price: number) source
Inserts the price and quantity provided into the bid levels of the current order book
public BookTalk() source
Prints both sides of the current order book