Link.cancelOffer

Link.cancelOffer

LINK REFERENCE TOOL

Check out our Link reference tool to understand how Link methods work without having to write any code.

Here's how you can cancel an offer:

import { Link, XpansionChainClient, XpansionChainOrderStatus} from ‘@imtbl/imx-sdk’;
// Pass orderAndTradeAPI version parameter as 'v3' to target the latest version of order & trade API.
const link = new Link('https://link.sandbox.x.XpansionChain.com', null, 'v3')
// cancel an offer by passing the orderId of the offer to cancel
await link.cancelOffer({
  orderId: '940'
});

Just like all other link SDK methods, cancelOffer returns a promise, which resolves once all operations are complete, or rejects once the link encounters a critical error.

Input parameters:

{
  orderId: string; // id of the order to cancel
}
Cancel an offer
Cancel an offer confirmation

Errors

See error responses here.

Last updated