cancelOrder

cancelOrder

function cancelOrder(
        address base,
        address quote,
        bool isBid,
        uint32 orderId
    ) public returns (uint256 refunded);
Cancels an order in an orderbook by the given order ID and order type.

Parameters

NameTypeDescription

base

address

Address of the base asset for the trading pair.

quote

address

Address of the quote asset for the trading pair.

isBid

bool

Boolean value to locate the order in bid and ask orders

orderId

uint256

The order id to locate the order and cancel

Returns

  • uint256 refunded : returned asset amount. If isBid is true, returned asset is quote asset. If isBid is false, returned asset is base asset.

Last updated