Orderbook
Last updated
Last updated
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)
exists(uint256 _orderId) -> bool |
---|
ordersLength() -> uint256 |
---|
verifyOrdersExist(uint256[] _orderIds) -> bool |
---|
verifyAllOrdersData(uint256[] _orderIds, bool _isBuyOrder) -> bool |
---|
verifyOrderOwners(uint256[] _orderIds, address _owner) -> bool |
---|
verifyOrdersReady(uint256[] _orderIds) -> bool |
---|
getOrderAmounts(uint256[] _orderIds, uint256 amountToFill, uint256 maxSpend) -> uint256[], uint256 |
---|
getPaymentTotals(uint256[] _orderIds, uint256[] _amounts) -> uint256, uint256[] |
---|
getOrder(uint256 _orderId) -> LibOrder.Order |
---|
placeOrder(LibOrder.OrderInput _order) -> uint256 |
---|
fillOrders(uint256[] _orderIds, uint256[] _amounts) |
---|
cancelOrders(uint256[] _orderIds) |
---|
claimOrders(uint256[] _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
.
Order structure object. See LibOrder.sol.
visibility: external
state mutability: view
Places an order on the exchange with order information _order
and returns the assigned order Id.
_order
OrderInput structure object. See LibOrder.sol.
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: