Skip to main content

Get data on a listing

Retrieve listing data from the orderbook SDK


💡Listing vs Order

Immutable provides two distinct types of orders:

  1. Listings: These are orders initiated by an NFT owner who intends to sell their asset on a marketplace. Listings are considered sell orders.
  2. Bids: Representing a prospective buyer's intention to acquire an asset, bids allow users to express their interest in purchasing a specific asset. Users can place a bid on the order book, anticipating a match with a seller. Bids are considered buy orders.
It is important to note that while bids are not currently available on the zkEVM platform. However, their integration is a key part of Immutable's future development roadmap.

Get a single listing

import { orderbook } from '@imtbl/sdk';

const getListing = async (client: orderbook.Orderbook, listingId: string) => {
const listing = await client.getListing(listingId);
};

Get listings from a particular NFT collection

This returns a list of listings. The following example filters by collection address and status.

import { orderbook } from '@imtbl/sdk';

const listListings = async (client: orderbook.Orderbook, contractAddress: string) => {
const listOfListings = await client.listListings({
sellItemContractAddress: contractAddress,
status: orderbook.OrderStatusName.ACTIVE,
pageSize: 50,
});
};

IMX Whitepaper IMX Tokenomics Block Explorer Careers Contact Us