Skip to main content
Learn how to batch multiple orderbook operations into single transactions, improving user experience and reducing gas costs. Essential for marketplace shopping carts and bulk listing management.

Overview

Bulk operations enable users to:
  • Bulk Listings: Create up to 20 listings with one signature
  • Bulk Fulfillment: Buy up to 50 orders in one transaction (shopping cart)
Benefits:
  • Fewer wallet confirmations (better UX)
  • Lower gas costs (batched transactions)
  • Faster marketplace operations
  • Enable shopping cart functionality
See Getting Started for prerequisites and installation. For bulk operations, you should also understand creating individual listings and filling individual orders.

Bulk Listing Creation

Create multiple NFT listings with a single signature, improving seller experience.

Limits and Constraints

How It Works

The prepareBulkListings() call returns:
  1. Actions - Approval transactions (if needed) + signable message
  2. completeListings() method - Scoped method to submit signatures

Basic Example

Create multiple ERC-721 listings at once:

Mixed Token Types

Create listings for both ERC-721 and ERC-1155 tokens:

Smart Contract Wallets (Passport)

Passport & Smart Contract WalletsWhen using smart contract wallets like Passport, users must sign separate confirmations for each listing. Unlike EOA wallets (MetaMask) which can sign once for all 20 listings, smart contract wallets require individual signatures.This is due to smart contract wallet architecture and cannot be batched.

Response Structure

The completeListings() method returns success/failure for each listing:
Handle partial failures gracefully:

Bulk Order Fulfillment (Shopping Cart)

Buy multiple NFTs in a single transaction—the foundation of marketplace shopping carts.

Limits and Constraints

How It Works

Bulk fulfillment handles common shopping cart scenarios:
  • Some orders already filled by others
  • Some orders cancelled
  • Insufficient balance for all items
  • Orders with mixed availability
The SDK provides:
  1. fulfillableOrders - Can be executed
  2. unfulfillableOrders - Cannot be executed (with reasons)
  3. sufficientBalance - Whether user can afford fulfillable orders
  4. Actions - Transactions to execute

Basic Example

Simple shopping cart checkout:

Response Structure

The response categorizes orders:

UX Strategies for Unavailable Items

When some cart items become unavailable, choose a user experience strategy:

Strategy 1: All or Nothing

Require users to fix cart before checkout:

Strategy 2: Best Effort

Automatically checkout available items without user intervention:
Ask user to confirm before proceeding with partial cart:

Insufficient Balance Handling

When user can’t afford fulfillable items:

Currency Consistency Requirement

All orders must use the same currencyYou cannot mix NATIVE and ERC-20 orders in a single bulk fulfillment. Enforce this on your frontend:

Partial Fills with Bulk Orders

Specify amountToFill for ERC-1155 partial fills:
If requesting more than available, best-effort fills up to max:

Complete Shopping Cart Example

Full implementation with all strategies:

Best Practices

For Bulk Listings

  1. Batch wisely: Keep under 20 listings per batch
  2. Handle approvals: Cache approval status per collection
  3. Smart contract wallets: Warn users about multiple signatures
  4. Error handling: Gracefully handle partial failures
  5. Status updates: Poll for PENDING → ACTIVE transitions

For Bulk Fulfillment

  1. Currency enforcement: Validate same currency on frontend
  2. Real-time availability: Refresh cart items before checkout
  3. Balance checks: Verify sufficient funds before transaction
  4. User communication: Clearly explain unavailable items
  5. Expiration warning: Show 3-minute countdown timer
  6. Retry logic: Handle race conditions gracefully
  7. Gas estimation: Show estimated gas cost for transparency

Next Steps

Create Listings

Single listing creation guide

Order Management

Query bulk-created orders

Fill Orders

Single order fulfillment guide

Cancel Orders

Soft and hard cancellation

Fees

Understanding marketplace fees