Skip to content
kebetsi edited this page Feb 17, 2015 · 2 revisions

The different data types that are sent in the system are defined in the Messages.scala file, they all inherit the Streamable trait.

####Transactions Transactions represent an order execution, it can store the buyer's and seller's information if available.

case class Transaction(mid: Long, price: Double, volume: Double, timestamp: Long, whatC: Currency, withC: Currency, buyerId: Long, buyOrderId: Long, sellerId: Long, sellOrderId: Long)

####Orders

#####Limit Orders Limit orders are executed immediately if a matching order exists in the order books, otherwise they are stored.

case class LimitBidOrder(override val oid: Long, override val uid: Long, override val timestamp: Long, override val whatC: Currency, override val withC: Currency, override val volume: Double, override val price: Double)
case class LimitAskOrder(override val oid: Long, override val uid: Long, override val timestamp: Long, override val whatC: Currency, override val withC: Currency, override val volume: Double, override val price: Double)

#####Market Orders Market orders are immediately executed against the best available order in the order books.

case class MarketBidOrder(override val oid: Long, override val uid: Long, override val timestamp: Long, override val whatC: Currency, override val withC: Currency, override val volume: Double, override val price: Double)
case class MarketAskOrder(override val oid: Long, override val uid: Long, override val timestamp: Long, override val whatC: Currency, override val withC: Currency, override val volume: Double, override val price: Double)

#####Delete Order Delete orders are used to cancel orders stored in the order books.

case class DelOrder(override val oid: Long, override val uid: Long, override val timestamp: Long, override val whatC: Currency, override val withC: Currency, override val volume: Double, override val price: Double)

####OHLC Open-High-Low-Close is an indicator representing the highest, lowest, open and close price of a financial instrument over a certain number of ticks defined by the duration value.

case class OHLC(marketId: Long, open: Double, high: Double, low: Double, close: Double, volume: Double, timestamp: Long, duration: Long)

####Tweet The content contains the message, the sentiment is the value assigned by the sentiment analysis module (-1, 0 or +1), imagesrc contains the URL to the author's profile picture.

case class Tweet(timestamp: Long, content: String, sentiment: Int, imagesrc: String, author: String)
Clone this wiki locally