Optional
options?: DefaultOptions & { Promise resolving to the transaction object representing the cancel action with the result of the order.
Throws an error if no open orders are found for the specified user.
import { getOpenOrders, cancelOrders } from '@clober/v2-sdk'
const openOrders = await getOpenOrders({
chainId: 421614,
userAddress:'0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0'
})
const transaction = await cancelOrders({
chainId: 421614,
userAddress: '0x00bfd44e79fb7f6dd5887a9426c8ef85a0cd23e0',
id: openOrders.map((order) => order.id)
})
Cancels specified open order if the order is not fully filled. [IMPORTANT] Set ApprovalForAll before calling this function.