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: falseandvalidUntilDate_gt: <now>to get only active offers. firstis capped (typically at 1000). Paginate viaskiporid_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.