Skip to main content
Immutable’s decentralised trading protocol. Orders created on any marketplace are visible and fillable across the entire ecosystem.

Why Orderbook?

Orders are visible across all Immutable marketplaces. Your players access the entire ecosystem’s liquidity, not just your marketplace.
Creating orders is free—sellers only sign a message. Gas is only paid when orders are filled.
Royalties are enforced at the protocol level. Creators always get paid on secondary sales.
Trades settle on-chain immediately. No waiting, no counterparty risk.

Core Concepts

Before diving into implementation, understand these universal orderbook concepts that apply across all platforms:

Order Types

Token Standards

Different NFT types behave differently in the orderbook:
  • Each token is unique (e.g., specific Sword #123)
  • Amount is always 1
  • Orders use FULL_RESTRICTED type
  • Cannot be partially filled
  • Most common for gaming items and collectibles
  • Learn more about ERC-721 contracts
  • ERC-20: Fungible tokens (e.g., USDC, project tokens)
  • NATIVE: Chain native currency (IMX on Immutable zkEVM)
  • Used as payment currency in orders
  • Amounts specified in smallest unit (wei)
  • Learn more about ERC-20 tokens

Maker vs Taker Model

The orderbook uses a maker/taker model to distinguish between liquidity providers and consumers: Maker 👷 Creates an order that goes on the orderbook (adds liquidity)
  • Listings: Sellers are makers
  • Bids: Buyers are makers
  • Collection bids, trait bids, and metadata bids: Buyers are makers (offers to buy into a collection or filtered subset)
  • Typically pay lower fees to incentivize order creation
  • Maker fees set at order creation and cannot be changed
Taker 🛒 Fills an existing order (removes liquidity)
  • Filling listings: Buyers are takers
  • Filling bids: Sellers are takers
  • Filling collection or trait bids: Sellers are takers (they choose which tokenId to sell into the bid)
  • Typically pay higher fees as they consume liquidity
  • Taker fees set flexibly at fulfillment time

Order Lifecycle

Orders progress through these statuses:
Optimistic UI: Status transitions happen asynchronously. Build your UI to handle PENDING → ACTIVE transitions gracefully.

Approval Pattern

The orderbook requires token approvals before certain operations: For Sellers (Creating Listings):
  • Before creating your first listing for an NFT collection, approve the Seaport contract to transfer your tokens
  • One-time per collection per user
  • Approval transaction costs gas
  • Subsequent listings of that collection don’t need approval
  • Smart contract wallets (Passport) may have pre-approved contracts via Hub configuration
For Buyers (Filling ERC-20 Orders):
  • Before buying with ERC-20 tokens, approve Seaport to spend those tokens
  • One-time per currency per user (or when allowance insufficient)
  • Native (IMX) orders never require buyer approval
For implementation details, see Creating Listings and Filling Orders

Getting Started

Prerequisites

Before using the Orderbook SDK, ensure you have:
  • User Authentication: Users authenticated with Passport or wallet connected (MetaMask, WalletConnect, etc.)
  • For Sellers:
  • For Buyers:
  • For Order Management:
    • Order IDs for querying or cancellation
    • Order ownership (for cancellation operations)

Installation

Install the orderbook package via npm:

TypeScript SDK Overview

View all available packages and configuration options

Setup

Creating Listings

Listings let users sell NFTs at a fixed price. Creating a listing is gasless—only the buyer pays gas when filling.
Signed Zone v2 MigrationAs of May 2024, all new listings must use Signed Zone v2 contract. The legacy v1 zone contract is deprecated and will be sunset in May 2025.
  • SDK users: Contract address automatically updated
  • Direct API users: Update zone contract address manually (not recommended - see contract addresses)
  • Existing listings: v1 listings remain supported until May 2025 sunset date

List an ERC-721 NFT

List an ERC-1155 NFT

For semi-fungible tokens, specify the quantity. Buy amount must be a multiple of sell amount.
Order Type Differences:
  • ERC-721 uses FULL_RESTRICTED order type (cannot be partially filled, amount always 1)
  • ERC-1155 uses PARTIAL_RESTRICTED order type (supports partial fills)
  • SDK automatically sets the correct order type based on token type

Filling Listings (Buying)

When a buyer fills a listing, the trade executes on-chain.

Creating Bids

Bids let users make offers on specific NFTs.

Order Expiration

Set when orders should expire:

Next Steps

Create Listings

Sell NFTs with gasless listings

Fill Orders

Buy NFTs from the orderbook

Order Management

Query orders, check status, and cancel

Bulk Operations

Create multiple listings or fill orders in bulk

Collection Bids

Bid on any NFT in a collection

Trait bids

Bid on NFTs that match metadata traits in a collection

Metadata bids

Bid on NFTs by metadata ID or by field-level metadata criteria

Fees

Protocol fees, royalties, and marketplace fees