Orderbook
State Variables
Functions
initialize
initialize
Initializes the orderbook contract with the provided parameters.
Parameters
setLmp
setLmp
Sets the last matched price in the price linked list.
Parameters
placeAsk
placeAsk
Places an ask order in the orderbook.
Parameters
placeBid
placeBid
Places a bid order in the orderbook.
Parameters
cancelOrder
cancelOrder
Cancels an order from the orderbook.
Parameters
Returns
execute
execute
Executes an order from the orderbook.
Parameters
Returns
fpop
fpop
Pops the first order with the given price from the orderbook.
Parameters
Returns
getRequired
getRequired
Retrieves the required amount for executing the order.
Parameters
Returns
heads()
heads()
Retrieves the head prices of the bid and ask lists.
Returns
askHead()
askHead()
Retrieves the head price of the ask list.
Returns
bidHead()
bidHead()
Retrieves the head price of the bid list.
Returns
mktPrice()
mktPrice()
Retrieves the market's last matched price.
Returns
getPrices
getPrices
Retrieves the prices from the bid or ask list.
Parameters
Returns
getOrderIds
getOrderIds
Retrieves the order IDs at a specific price from the bid or ask list.
Parameters
Returns
getOrders
getOrders
Retrieves the orders at a specific price from the bid or ask list.
Parameters
Returns
getOrder
getOrder
Retrieves a specific order from the bid or ask list.
Parameters
Returns
assetValue
assetValue
Retrieves the asset value in the quote asset if isBid
is true, otherwise retrieves the asset value in the base asset.
Parameters
Returns
Last updated