orderbook
current.ob
:current.time
:current.ob
.
file
:file.index
:ob.data
:hash
that contains all orders
currently in the orderbook. Essentially the same as current.ob,
but a different data structure.
trade.data
:vector
that contains data on all
trades that occurred before current.time.
trader
: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.
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)
Run the code above in your browser using DataLab