verification
use it
# add to stunt.yaml
services:
opensea:
adapter: embedded:opensea-style
# then
$ stunt upThe embedded: source extracts this adapter from the binary — no git clone, fully offline.
how to mock the OpenSea API locally
Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of OpenSea API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real OpenSea API 2.0.0 surface — the data is fake, the behavior is real.
backing stores
assetscollectionseventslistingsoffers
api surface (7)
generated from the adapter manifest — exactly what boots, nothing more · covers 2% of the real API's 139 routes (derived from spec OpenSea ReadMe registry spec (semi-official) @ 2.0.0)
7 routes
GET/api/v2/assets
GET/api/v2/assets/{chain}/{address}/{identifier}
GET/api/v2/collections/{slug}
GET/api/v2/events
GET/api/v2/orders/{chain}/{protocol}/listings
GET/api/v2/orders/{chain}/{protocol}/offers
POST/api/v2/offers
VM-verified behaviors (9)
- ✓the X-API-KEY gate 401s every surface with the V1ErrorWrapper envelope
- ✓the asset list seeds five mock-punks NFTs and filters by collection_slug
- ✓single-asset reads match the address case-insensitively and 404 unknown shapes
- ✓collections read back contracts and string-typed stats; unknown slugs 404
- ✓limit/next cursor pagination walks the pages and 400s a malformed cursor
- ✓events filter by collection_slug and event_type
- ✓listings carry the Seaport ask shape: the NFT in offer, payment in consideration
- ✓offers invert the shape: payment in offer, the NFT in consideration
- ✓created offers are stateful, deterministic, and defaulted
Not implemented (4)
- No collections list endpoint (GET /api/v2/collections), only get-by-slug
- No listing creation or order cancellation (offer creation only)
- No account lookup (GET /api/v2/accounts/{address})
- No NFT transfer history endpoint (chain/{chain}/transfers)
Differs from the real API (4)
- X-API-KEY accepted as any non-empty value; no real key validation
- Asset routes serve the deprecated v2 surface; real v2 replaced them with collection-scoped nfts endpoints
- Identical offers re-create and store duplicate orders (no order_hash dedupe)
- Create-offer body and response are simulator-specific, not the documented criteria-offer shapes
want more of the OpenSea API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.