Link.makeOffer
Link.makeOffer
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 well

Errors
Last updated