Link.makeOffer
Link.makeOffer
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 make 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')
// make an offer for 0.25 ETH
await link.makeOffer({
tokenId: '123',
tokenAddress: '0x2ca7e3fa937cae708c32bc2713c20740f3c4fc3b',
amount: '0.25',
currencyAddress: ''
fees: [ // optionally specify buyer marketplace fees in array, protocol and royalty fees are applied automatically
{
address: '0x383b14727ac2bD3923f1583789d5385C3A26f91E',
fee_percentage: 0.5, // equal to 0.5%
},
],
});
// NOTE: removing the currencyAddress property will default to the offer to be in ETH as wellJust like all other link SDK methods, makeOffer returns a promise, which resolves once all operations are complete, or rejects once the link encounters a critical error.
Input parameters:
Make offer response:


Errors
See error responses here.
Last updated