Listings
A listing is a signed EIP-712 MakerOrder that represents an NFT for sale at a fixed price. Listings are stored off-chain and fulfilled on-chain by the MintpadExchange contract when a buyer executes a purchase.
Operations
| Operation | Endpoint | Description |
|---|---|---|
| Create | POST /v1/listings | Sign and submit a new listing |
| Query | GET /v1/listings | Fetch active listings with pagination |
| Cancel | DELETE /v1/listings/:orderHash | Cancel an active listing |
| Update | Cancel + Create | Update price or expiration |
EIP-712 Order Fields
Each listing is a MakerOrder struct signed by the token owner:
| Field | Type | Value |
|---|---|---|
isOrderAsk | bool | Always true for sell listings |
signer | address | Owner's wallet address |
collection | address | NFT contract address |
price | uint256 | Price in Wei (WCRO) |
tokenId | uint256 | The NFT token ID |
amount | uint256 | Always 1 for ERC-721 |
strategy | address | Strategy contract address (resolved by builder API) |
currency | address | WCRO: 0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23 |
nonce | uint256 | Unique order nonce (use current timestamp) |
startTime | uint256 | Listing start — Unix epoch (seconds) |
endTime | uint256 | Listing expiration — Unix epoch (seconds) |
minPercentageToAsk | uint256 | Always 8500 (85% minimum return) |
params | bytes | Always 0x |
ERC-721 Approval Requirement
Before requesting a signature, verify the seller has approved the exchange contract to transfer their NFT. If not, prompt them to call setApprovalForAll on the collection contract:
- Exchange Address:
0xdFbE43b2c154B6a790158fa2696cDb32A86Efc78 - Function:
setApprovalForAll(exchangeAddress, true)
TypeScript
// ethers.js v6const nftContract = new Contract(collectionAddress, ERC721_ABI, provider)const isApproved = await nftContract.isApprovedForAll(sellerAddress, EXCHANGE_ADDRESS)if (!isApproved) { const tx = await nftContract.connect(signer).setApprovalForAll(EXCHANGE_ADDRESS, true) await tx.wait()}