Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Discover offers · Boson Protocol
Skip to content

Discover offers

Buyers (and agents acting on their behalf) find offers by querying the Boson subgraph. The SDK and MCP both wrap subgraph queries with TypeScript types.

SDK
// All offers for one seller (use the seller's numeric id; the subgraph schema
// doesn't accept a nested `seller_` path with admin filter).
const offers = await sdk.getOffers({
  where: { sellerId },
  first: 50,
})
 
// Offers in a given price range and token
const cheap = await sdk.getOffers({
  where: {
    exchangeToken: USDC_ADDRESS,
    price_lt: "10000000",         // < 10 USDC
    voided: false,
  },
  orderBy: "createdAt",
  orderDirection: "desc",
})

Search and faceted filtering

For full-text or faceted search across offers (by title, attributes, seller name), use the Search mixin (SDK) or higher-level marketplace queries.

Indexing lag

The subgraph lags 1–3 blocks behind chain. An offer created just now may not appear in getOffers for a few seconds. See Eventing & indexing.

Common gotchas

  • The subgraph stores derived states. Filter on voided: false and validUntilDate_gt: <now> to get only active offers.
  • first is capped (typically at 1000). Paginate via skip or id_gt.
  • Querying by metadata fields requires they be indexed — title, description, attributes — but not every custom field. See Reference → Subgraph queries for the indexed schema.

Next