Cancel Order
The cancelOrder
function allows users to cancel an existing order.
Function Signature
Parameters
orderCapId
: The ID of the order to cancelcollateralToken
: The token used as collateral (e.g., "USDC")indexToken
: The token used as the market index (e.g., "BTC")long
: Boolean indicating if this is a long (true) or short (false) positiontype
: The type of order ("OPEN_POSITION" or "DECREASE_POSITION")
Return Value
Returns a Promise
that resolves to a TransactionBlock
object.
Usage Example
Last updated