API Reference
REST endpoints served by the Next.js app at /api/*. All responses are JSON. Validation errors return { error } with HTTP 4xx.
Trades
GET /api/trades
Cursor-paginated trade list. Filters: status, sort (newest, oldest, ending_soon, value_desc, value_asc, reputation), assetKind, collection, token, verifiedOnly, maker, q. Returns { items, nextCursor }.
GET /api/trades/:address
Single trade with counter offers. Returns { trade, counterOffers }.
Wallets
GET /api/wallets/:address
Reputation + open trades by maker.
GET /api/wallets/:address/trades
All trades (maker/taker) + counter offers targeted at wallet.
Portfolio
GET /api/portfolio/:address
Helius DAS-backed portfolio: SOL, tokens, NFTs with USD values.
Other endpoints
GET /api/search?q=— unified searchGET /api/activity— event feed with paginationGET /api/stats— protocol TVL, volume, countsGET /api/prices?mints=— Jupiter token pricesGET /api/assets/:id— asset metadata by mintGET /api/tokens/search?q=— token searchGET/POST/DELETE /api/favorites— saved tradesGET/POST /api/notifications— per-wallet inbox
Types
All TypeScript types (TradeSummary, TradeAsset, WalletReputation, etc.) are exported from @bazaarfi/shared and validated with Zod schemas in @bazaarfi/shared/schemas.
Full endpoint documentation with request/response examples: docs/api-reference.md