v0.13 Orderbook support
Overview
Adds official hosted orderbook support for all supported 0x v4 chains.
Save Order
To save an order to the hosted orderbook:
await nftSwapSdk.saveOrder(signedOrder);
Fetch orders
// Search the orderbook for all offers to sell this NFT (CryptoCoven #9757)
const orders = await nftSwap.getOrders({
nftToken: "0x5180db8f5c931aae63c74266b211f580155ecac8",
nftTokenId: "9757",
sellOrBuyNft: "sell", // Only show asks (sells) for this NFT (excludes asks)
});
// Or search by unique nonce
const orders = await nftSwap.getOrders({
nonce: "0x31f42841c2db5173425b5223809cf3a38fede360",
});
https://docs.swapsdk.xyz/0x-v4/hosted-orderbook (Comprehensive docs forthcoming)
Relevant links:
All orders: https://api.trader.xyz/orderbook/orders
Status page: https://status.trader.xyz
Example from ETHDenver workshop: https://slides.com/johnj/nft-workshop#/40/0/6