← Protocols
Reservoir
01Description

NFT marketplace infrastructure: aggregated order book and liquidity across OpenSea, Blur, LooksRare, X2Y2, and more. APIs and React kits to read collections and execute buy/list/bid flows.

02Best for
  • 01building NFT marketplaces
  • 02cross-marketplace order aggregation
  • 03buy / list / bid execution
  • 04collection and token metadata
  • 05sweep and bulk-buy UX
03Install
  • pnpm add @reservoir0x/reservoir-sdk viem
  • pnpm add @reservoir0x/reservoir-kit-ui
04Environment variables
VariableScopeDescription
RESERVOIR_API_KEYServerReservoir API key from the dashboard. Required for production traffic; demo key has tight rate limits.
05Prompt snippet
Use `@reservoir0x/reservoir-sdk` for actions and `@reservoir0x/reservoir-kit-ui` for ready-made buy/list/bid modals. Configure once: `createClient({ chains: [{ id: 1, baseApiUrl: 'https://api.reservoir.tools', active: true, apiKey: process.env.RESERVOIR_API_KEY }], source: 'your-app.xyz' })`. Read collection data via REST `GET /collections/v7?id=<contract>` with `x-api-key`. Execute purchases through `getClient().actions.buyToken({ items, wallet, onProgress })`, which handles approvals, signatures, and routing across marketplaces. `viem` is a required peer dependency.
06Gotchas
  • Reservoir is EVM-only — no Solana, Bitcoin, or non-EVM chain support; use Tensor/Magic Eden APIs for Solana.
  • Each supported chain has its own base URL (`api.reservoir.tools`, `api-base.reservoir.tools`, `api-arbitrum.reservoir.tools`, etc.) — the SDK abstracts this but raw `fetch` callers must pick the right host.
  • Without an API key you fall back to a heavily rate-limited demo key; production traffic will get 429'd silently and orders may stall.
  • The buy/sell/bid flows require an EIP-1193 wallet client (e.g. viem `WalletClient`) — passing an ethers signer needs an adapter and is a common source of `wallet is undefined` errors.
  • Order data is aggregated from third-party marketplaces; an order can be valid in Reservoir's index but already filled or cancelled on-chain at execution time — always handle the on-chain revert path.
07Alternatives