BazaarTable

LOB-like bazaar order table

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Creates a new bazaar order

Link copied to clipboard

Iterates through the buy orders

Link copied to clipboard

Iterates through the sell orders

Link copied to clipboard

Gets the next buy order without shifting the queue

Link copied to clipboard

Gets the next sell order without shifting the queue

Link copied to clipboard
fun popOrder(order: BazaarOrder)

Pops the provided order from the queue

Link copied to clipboard
open override fun store()

Stores itself into a mongo database

Link copied to clipboard

Attempts to count summary of a bazaar item. This is a pretty expensive operation because it uses kotlin-provided sorting method (kotlin.collections.sorted) under the hood.

Link copied to clipboard

Gets the amount top buy orders, sorted by the price per item descending

Link copied to clipboard

Gets the amount top sell orders, sorted by the price per item ascending

Properties

Link copied to clipboard

Total count of item entries. This is equal to the total amount of values of the BazaarElement enum

Link copied to clipboard
Link copied to clipboard
open override val mongo: List<MongoBazaarData>

Gets MongoDB representation of this object

Link copied to clipboard

Total amount of both buy and sell orders