Skip to content

v12.3.0

Choose a tag to compare

@ryanio ryanio released this 07 Sep 23:37
· 10 commits to main since this release

What's Changed

Follow-ups from an external integrator report, continuing from 12.1.1.

Two query parameters the API silently ignored (#679)

Both failed in the worst available shape: no error, no effect, no way for the caller to tell.

Token pagination was broken. getTrendingTokens and getTopTokens took a next cursor, but those endpoints read cursor. The response field is next, so feeding the cursor straight back looked obviously right and returned the first page every time. Anyone paging these was looping over page 1.

GetTokensArgs.cursor is the parameter now. next is deprecated and forwarded to cursor, so existing callers start paginating rather than breaking.

getEvents sent a chain filter that does nothing. GET /api/v2/events documents no chain parameter and does not filter on one: a request for chain=solana still returned Ethereum events. No longer sent. getEventsByAccount is unaffected, since its endpoint does document chain and does filter.

Also adds documented parameters that were unreachable: chains on GetTokensArgs and PortfolioArgs, and array values for GetEventsArgs.eventType, which the spec models as repeatable.

An optional fetch transport (#681)

OpenSeaAPIConfig.fetch is the transport for every instance request, defaulting to the global fetch. It is the seam for a cache, a shared rate limiter, retries or request-level instrumentation. Previously the only way to wrap requests was to subclass OpenSeaAPI and override a public method, which ties the wrapper to that method's signature and cannot carry extra per-request context.

The transport receives the fully built URL and init, including X-API-KEY and Authorization, so treat anything it logs or caches as sensitive, key any cache on the credentials, and do not cache anything but GET.

Drift guards (#679, #680)

A spec-drift check now compares each query-args interface against its operation's documented parameters in both directions, pinned to the interfaces at compile time, plus tests asserting what those args actually serialize to on the wire. The check found the chain bug on its first run.

Full Changelog: v12.2.0...v12.3.0