Skip to content

Releases: ProjectOpenSea/opensea-js

v11.1.1

29 May 17:41

Choose a tag to compare

What's Changed

  • fix: correct GetSwapQuoteArgs to match the swap quote endpoint. getSwapQuote now takes { fromChain, fromAddress, toChain, toAddress, quantity, address, slippage?, recipient? }, matching GET /api/v2/swap/quote. The previous { tokenIn, tokenOut, amount, chain } shape did not map to the endpoint's query params. (#364)

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v11.1.0...sdk-v11.1.1

v11.1.0

27 May 21:15

Choose a tag to compare

What's Changed

Expose the two new token endpoints from @opensea/api-types 0.4.3.

  • OpenSeaAPI.getTokenHolders(chain, address, args?)TokenHoldersResponse — paginated holders (limit, cursor, sortBy: "QUANTITY", sortDirection) plus aggregate distribution health (STRONG | HEALTHY | CONCERNING | BAD).
  • OpenSeaAPI.getTokenLiquidityPools(chain, address, args?)TokenLiquidityPoolsResponse — pool type, USD reserves, bonding-curve progress, graduation flag.
  • New type exports: TokenHoldersResponse, TokenHoldersArgs, TokenLiquidityPoolsResponse, TokenLiquidityPoolsArgs.
  • New path helpers in apiPaths.ts: getTokenHoldersPath, getTokenLiquidityPoolsPath.

Also bumps @opensea/api-types dependency to 0.4.3 (transitively brings in agent_binding, twitter_follower_count, and the new schema exports — see api-types-v0.4.3 release notes for details).

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v11.0.0...sdk-v11.1.0

v11.0.0

27 May 02:22

Choose a tag to compare

What's Changed

Major

  • Rebuild the SDK's type layer on @opensea/api-types with automatic case translation at the fetcher boundary (#336, #339). Consumer API stays camelCase; the fetcher snakeizes outgoing query params + POST bodies and camelizes responses, so the SDK no longer ships hand-rolled response shapes. utils/converters.ts is gone. See the changelog for the full shape-change list — notably:
    • Order.protocolData / Order.protocolAddress are now optional (profile endpoints intentionally null them out for performance — code reading them unconditionally needs a guard).
    • Order base type no longer carries price; only Offer and Listing do.
    • Offer / Listing gain remainingQuantity, orderCreatedAt, asset?: OrderAsset.
    • NFT is now NftDetailed — gains displayImageUrl, displayAnimationUrl, originalImageUrl, originalAnimationUrl, animationUrl, isSuspicious, subscription.
    • Breaking renames from acronym normalization: paymentToken.imageUrlpaymentToken.image, collection.isNSFWcollection.isNsfw, rarity.calculatedAt/maxRank/tokensScored dropped (weren't actually in the spec).

Patch

  • Source EventPayment, EventAsset, GetNFTResponse, BuildOfferResponse, and CancelOrderResponse from @opensea/api-types instead of hand-rolling them (#343).
  • Critical fix: mixed-casing wire-shape regression (#344). The OpenSea OpenAPI spec uses mixed casing — outer envelope keys are snake_case but inner Seaport struct keys (parameters.startTime, parameters.itemType, parameters.offerer, etc.), CancelRequest.offererSignature, and CriteriaObject.numericTraits are camelCase. The new snakeizeKeysDeep was rewriting them all to snake_case, breaking postListing / postOffer / offchainCancelOrder / buildOffer / postCollectionOffer. Fix adds a snakeizeBody?: boolean opt-out on Fetcher.post() and updates internal callsites to emit bodies in exact wire shape. Also camelizes requestInstantApiKey + error envelopes, adds null-safe socialMediaAccounts, fixes camelToSnake leading-underscore for PascalCase keys, drops dead OrderV2/Order casts, and ships 12 new unit tests + a new nightly SDK integration workflow.

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.5.0...sdk-v11.0.0

v10.5.0

13 May 21:56

Choose a tag to compare

What's Changed

Surface the 22 new endpoints added in @opensea/api-types@0.4.0 as SDK methods.

New OpenSeaAPI methods (delegated to the underlying domain clients):

  • Batch lookupsgetTokensBatch, getNFTsBatch, getCollectionsBatch
  • ListingscreateListingActions (returns ordered approval + Seaport-sign actions)
  • DropsdeployDropContract, getDeployContractReceipt
  • AssetstransferAssets (new internal AssetsAPI client)
  • Collection analyticsgetCollectionOfferAggregates, getCollectionHolders, getCollectionFloorPrices
  • Token analyticsgetTokenPriceHistory, getTokenOhlcv, getTokenActivity
  • NFT analyticsgetNFTOwners, getNFTAnalytics
  • Account profilegetPortfolioStats, getPortfolioHistory, getProfileOffers, getProfileOffersReceived, getProfileListings, getProfileFavorites, getProfileCollections

Request/response types re-exported through @opensea/sdk from @opensea/api-types. Pure additive — no removed endpoints.

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.4.0...sdk-v10.5.0

v10.4.0

07 May 22:51

Choose a tag to compare

What's Changed

Aligns @opensea/sdk with the API surface introduced in @opensea/api-types@0.3.0 (os2-core#40171 + #40190).

Removed (breaking)

The underlying GET endpoints were deleted upstream — these methods would return 404 against the new API:

Method Why Replacement
getOrder, getOrders, postOrder already @deprecated; backing path deleted getBest{Offer,Listing} / getAll{Offers,Listings} / post{Offer,Listing}
getNFTOffers(contract, tokenId) endpoint deleted getOffersByNFT(slug, tokenId) (new)
getNFTListings(contract, tokenId) no per-NFT all-listings endpoint exists getBestListing(slug, tokenId) for one, or getAllListings(slug) + filter

Behavior changes

  • postListing / postOffer now read the bare Listing / Offer response (the upstream order wrapper field was removed).
  • OpenSeaSDK.createOffer returns Promise<Offer> (was Promise<OrderV2>).
  • OpenSeaSDK.createListing returns Promise<Listing> (was Promise<OrderV2>).
  • createBulkListings / createBulkOffers return BulkOrderResult<Listing> / BulkOrderResult<Offer>. BulkOrderResult is now generic in the success type.

New methods

  • getOffersByNFT(slug, identifier, limit?, next?) — all offers for one NFT.
  • sweepCollection(request) — bulk-buy with any payment token (incl. cross-chain).
  • executeSwap(request) — multi-asset companion to getSwapQuote.
  • getTransactionReceipt(request) — fetch tx status.
  • New TransactionsAPI sub-client.

Cleanup

  • Helpers getOrdersAPIPath, serializeOrdersQueryOptions, deserializeOrder removed.
  • Types OrderAPIOptions, OrdersQueryOptions, OrdersQueryResponse, OrdersPostQueryResponse, ListingPostQueryResponse, OfferPostQueryResponse, SerializedOrderV2, GetOrdersResponse removed.
  • IntervalStat.{volume_diff, volume_change, sales_diff, average_price} and Stats.{market_cap, average_price} removed.

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.3.1...sdk-v10.4.0

v10.3.1

04 May 20:20

Choose a tag to compare

What's Changed

Cross-chain fulfillment types are now sourced from @opensea/api-types instead of being hand-rolled in src/api/types.ts. Type names align with the canonical OpenAPI schema names (#242):

  • CrossChainListingListingObject
  • CrossChainFulfillmentDataRequestCrossChainFulfillmentRequest
  • CrossChainFulfillmentDataResponseCrossChainFulfillmentResponse
  • CrossChainTransactionSwapTransactionResponse

The runtime call signature on BaseOpenSeaSDK.getCrossChainFulfillmentData() is unchanged.

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.3.0...sdk-v10.3.1

v10.3.0

04 May 19:06

Choose a tag to compare

What's Changed

Cross-chain fulfillment

New getCrossChainFulfillmentData() method on ListingsAPI, OpenSeaAPI, and BaseOpenSeaSDK for buying NFTs using tokens from a different chain (e.g., USDC on Base → ETH mainnet NFT). Supports same-chain different-token purchases and sweeping up to 50 listings in a single request.

The method accepts listings, fulfiller, payment token (chain + address), and optional recipient. Returns ordered transactions to sign and submit.

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.2.1...sdk-v10.3.0

v10.2.1

01 May 02:02

Choose a tag to compare

What's Changed

Patch release adding server-side trait filtering on three collection-scoped read methods.

Server-side trait filtering

getNFTsByCollection, getBestListings, and getEventsByCollection now accept an optional traits argument:

import type { TraitFilter } from "@opensea/sdk"

const { nfts } = await openseaSDK.api.getNFTsByCollection(
  "doodles-official",
  undefined, undefined,
  [{ traitType: "Background", value: "Red" }],
)
  • Multiple entries are AND-combined server-side.
  • Empty result when no items match (not all items).
  • Returns 400 if a single trait matches more than 1000 items.
  • The SDK accepts a structured TraitFilter[] and JSON-encodes it for the wire — callers don't need to JSON.stringify.

New exports

  • TraitFilter{ traitType, value } shape.
  • GetEventsByCollectionArgs — extends GetEventsArgs with traits. Type-restricts the field to the collection endpoint, so the other event methods reject traits at compile time.
  • encodeTraitsParam — exposed for callers building requests directly (e.g. via the generic api.get()).

Requirements

  • Requires @opensea/api-types@^0.2.2 (already a transitive dep on install).

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.2.0...sdk-v10.2.1

v10.2.0

21 Apr 01:02

Choose a tag to compare

What's Changed

Add token-groups and instant API key endpoints.

  • sdk.api.getTokenGroups({ limit?, cursor? }) and sdk.api.getTokenGroup(slug) for the new /api/v2/token-groups endpoints.
  • OpenSeaSDK.requestInstantApiKey() and OpenSeaAPI.requestInstantApiKey() — static methods that call POST /api/v2/auth/keys without authentication and return a free-tier key you can pass into the SDK constructor. Rate limited to 3 keys/hour per IP; keys expire after 30 days.
  • OpenSeaAPI class is now exported from the package root (@opensea/sdk and @opensea/sdk/viem).

Patch

  • Update @opensea/seaport-js from ^4.0.7 to ^4.1.1.

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.1.0...sdk-v10.2.0

v10.1.0

15 Apr 16:49

Choose a tag to compare

What's Changed

Minor Changes

  • Add missing API wrapper methods for full OpenAPI spec coverage:
    • getNFTCollection() -- get the collection an NFT belongs to
    • getNFTMetadata() -- get raw NFT metadata (name, description, image, traits)
    • Expose fulfillPrivateOrder() as a public method on OpenSeaSDK

Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.0.0...sdk-v10.1.0