Marketplace
Cometh ConnectCometh MarketplaceCometh checkout
  • Demo
  • API reference doc
  • SDK reference doc
  • 🚀Quickstart
    • Getting started
    • Core concepts
    • API cheatsheet
    • Third party helpers
  • 🛠️Core features
    • Get collection data
    • Assets search engine
    • Creating an order
    • Searching orders
    • Filling an order
    • Cancelling an order
  • ⚗️Advanced features
    • Tracking indexing
    • Get asset transfers
    • Admin routes
    • Refreshing metadata
    • Webhooks
  • 📖Resources
    • Why Cometh Marketplace
    • Order flow
    • Preparing for transactions
    • Sponsoring transactions
Powered by GitBook
On this page
  1. Core features

Searching orders

Last updated 8 months ago

Orders can be searched using various criteria. This can be useful to display orders for a user or an asset with different filters. The results are paginated and the search always returns the total number of results.

const ordersSearch = await marketplaceSdk.order.searchOrders({
    maker: userAddress,
    tokenAddress: MY_COLLECTION_ADDRESS,
    statuses: [TradeStatus.OPEN, TradeStatus.FILLED],
    direction: TradeDirection.SELL,
    limit: 100,
    skip: 0,
    orderBy: SearchOrdersSortOption.SIGNED_AT,
    orderByDirection: FilterDirection.DESC
})

const userOrders = ordersSearch.orders

In this example, we display the sales orders of a user with the status "Open" or "Filled" sorted by decreasing signature date.

Order statuses are explained in more detail in Order flow.

All our API routes are also available without the SDK. Here, it's the .

🛠️
search orders route