Description Objects from the class Slots Methods Examples
Functions for manipulating and extractiong information from an orderbook
Objects can be created by calls to the function orderbook
current.ob
:A data frame containing the current state of the orderbook.
current.time
:A numeric value in milliseconds after
midnight that indicates the time of current.ob
.
file
:A character string which specifies the location of the file containing the data file.
file.index
:A numeric value that indicates the current row number of the input file.
ob.data
:A hash
that contains all orders
currently in the orderbook. Essentially the same as current.ob,
but a different data structure.
trade.data
:A vector
that contains data on all
trades that occurred before current.time.
trader
:A logical
indicating whether the order
book should expect data with user orders and trades marked.
signature(object = "orderbook")
:
Prints the variables used in the orderbook
signature(object = "orderbook")
: Returns the
current best bid.
signature(object = "orderbook")
: Returns the
current best ask.
signature(object="orderbook")
: Prints a
summary of the orderbook
signature(x = "orderbook", i = "character")
: Prints
the orders at that price level.
signature(x = "orderbook")
: Creates a copy of the
orderbook.
signature(object = "orderbook")
: Returns
the price and size of the order with the specified ID.
signature(object="orderbook")
: Prints the state
of the orderbook. The result is similar to plot
signature(object="orderbook")
: Returns
the number of bid price levels.
signature(object="orderbook")
: Returns
the number of ask price levels.
signature(object="orderbook")
:
Returns the total number of price levels.
signature(object="orderbook")
: Returns the
number of bids.
signature(object="orderbook")
: Returns the
number of asks.
signature(object="orderbook")
: Returns the
total number of orders.
signature(object="orderbook")
: Returns the
midpoint between the best ask and the best bid.
signature(object="orderbook")
: Returns a
data frame with a row for the best ask and a row for the best bid. The
columns are price, size, and type.
signature(object="orderbook")
: Returns the
spread between the best ask and best bid .
signature(object="orderbook")
: Reset the
orderbook to its initial state.
1 2 3 4 5 6 7 8 9 10 11 | library(orderbook)
filename <- system.file("extdata", "sample.txt",
package = "orderbook")
ob <- orderbook(file = filename)
ob <- read.orders(ob, 500)
show(ob)
summary(ob)
display(ob)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.