Orderbook
FUNCTIONS
exists(_orderId)
ordersLength()
verifyOrdersExist(_orderIds)
verifyAllOrdersData(_orderIds, _isBuyOrder)
verifyOrderOwners(_orderIds, _owner)
verifyOrdersReady(_orderIds)
getOrderAmounts(_orderIds, amountToFill, maxSpend)
getPaymentTotals(_orderIds, _amounts)
getOrder(_orderId)
placeOrder(_order)
fillOrders(_orderIds, _amounts)
cancelOrders(_orderIds)
claimOrders(_orderIds)
Verifies whether the order _orderId
has ever been placed.
visibility: external
state mutability: view
Returns the total number of orders that have been placed on the exchange.
visibility: external
state mutability: view
Runs a loop of the exists
function to verify that all the orders in _orderIds
exist and have been placed on the exchange.
visibility: external
state mutability: view
Verifies whether all the orders in _orderIds
reference the same asset and token payment. And it checks that all the orders' buy/sell order type matches _isBuyOrder
.
visibility: external
state mutability: view
Verifies whether the owner of the orders in _orderIds
matches _owner
.
visibility: external
state mutability: view
Verifies whether all the orders in _orderIds
are still available to fill.
visibility: external
state mutability: view
Returns the amount of the asset to be filled from each order in _orderIds
. The sum of which cannot exceed amountToFill
, and the cumulative price cannot exceed maxSpend
.
visibility: external
state mutability: view
Returns the token payment to be paid for each order in orderIds
and the cumulative payment for the entire fill order.
visibility: external
state mutability: view
Returns the order information of _orderId
.
visibility: external
state mutability: view
Places an order on the exchange with order information _order
and returns the assigned order Id.
Requirements:
The token payment must be on the list of supported ERC20 tokens.
visibility: external
state mutability:
Updates the order information of _orderIds
as to the amount of assets filled and its order state.
visibility: external
state mutability:
Updates the order state of _orderIds
to "CANCELLED".
Requirement:
The order state of the orders must either be "READY" or "PARTIALLY_FILLED".
visibility: external
state mutability:
Updates the order state of _orderIds
to "CLAIMED" if the order is completely filled and the owner has claimed it.
visibility: external
state mutability:
Last updated