public class |source

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

Private Members
private

Object used manage the internal list of ask levels

private

Object used manage the internal list of bid levels

Method Summary

Public Methods
public

BookDeleA(quantity: number, price: number)

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)

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

Returns a specific ask level of the book as an Object

public

BookItemB(cnt: number): {"price": *, "quantity": *}: Object

Returns a specific ask level of the book as an Object

public

BookPlusA(quantity: number, price: number)

Inserts the price and quantity provided into the ask levels of the current order book

public

BookPlusB(quantity: number, price: number)

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

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

Params:

NameTypeAttributeDescription
quantitynumber
pricenumber

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

Params:

NameTypeAttributeDescription
quantitynumber
pricenumber

public BookItemA(cnt: number): {"price": *, "quantity": *}: Object source

Returns a specific ask level of the book as an Object

Params:

NameTypeAttributeDescription
cntnumber

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:

NameTypeAttributeDescription
cntnumber

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

Params:

NameTypeAttributeDescription
quantitynumber
pricenumber

public BookPlusB(quantity: number, price: number) source

Inserts the price and quantity provided into the bid levels of the current order book

Params:

NameTypeAttributeDescription
quantitynumber
pricenumber

public BookRowsA(): *: number source

Returns the current ask levels of the book as a list

Return:

*

public BookRowsB(): *: number source

Returns the current bid levels of the book as a list

Return:

*

public BookTalk() source

Prints both sides of the current order book