Releases: ProjectOpenSea/opensea-js
v11.1.1
What's Changed
- fix: correct
GetSwapQuoteArgsto match the swap quote endpoint.getSwapQuotenow takes{ fromChain, fromAddress, toChain, toAddress, quantity, address, slippage?, recipient? }, matchingGET /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
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
What's Changed
Major
- Rebuild the SDK's type layer on
@opensea/api-typeswith 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.tsis gone. See the changelog for the full shape-change list — notably:Order.protocolData/Order.protocolAddressare now optional (profile endpoints intentionally null them out for performance — code reading them unconditionally needs a guard).Orderbase type no longer carriesprice; onlyOfferandListingdo.Offer/ListinggainremainingQuantity,orderCreatedAt,asset?: OrderAsset.NFTis nowNftDetailed— gainsdisplayImageUrl,displayAnimationUrl,originalImageUrl,originalAnimationUrl,animationUrl,isSuspicious,subscription.- Breaking renames from acronym normalization:
paymentToken.imageUrl→paymentToken.image,collection.isNSFW→collection.isNsfw,rarity.calculatedAt/maxRank/tokensScoreddropped (weren't actually in the spec).
Patch
- Source
EventPayment,EventAsset,GetNFTResponse,BuildOfferResponse, andCancelOrderResponsefrom@opensea/api-typesinstead 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, andCriteriaObject.numericTraitsare camelCase. The newsnakeizeKeysDeepwas rewriting them all to snake_case, breakingpostListing/postOffer/offchainCancelOrder/buildOffer/postCollectionOffer. Fix adds asnakeizeBody?: booleanopt-out onFetcher.post()and updates internal callsites to emit bodies in exact wire shape. Also camelizesrequestInstantApiKey+ error envelopes, adds null-safesocialMediaAccounts, fixescamelToSnakeleading-underscore for PascalCase keys, drops deadOrderV2/Ordercasts, 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
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 lookups —
getTokensBatch,getNFTsBatch,getCollectionsBatch - Listings —
createListingActions(returns ordered approval + Seaport-sign actions) - Drops —
deployDropContract,getDeployContractReceipt - Assets —
transferAssets(new internalAssetsAPIclient) - Collection analytics —
getCollectionOfferAggregates,getCollectionHolders,getCollectionFloorPrices - Token analytics —
getTokenPriceHistory,getTokenOhlcv,getTokenActivity - NFT analytics —
getNFTOwners,getNFTAnalytics - Account profile —
getPortfolioStats,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
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/postOffernow read the bareListing/Offerresponse (the upstreamorderwrapper field was removed).OpenSeaSDK.createOfferreturnsPromise<Offer>(wasPromise<OrderV2>).OpenSeaSDK.createListingreturnsPromise<Listing>(wasPromise<OrderV2>).createBulkListings/createBulkOffersreturnBulkOrderResult<Listing>/BulkOrderResult<Offer>.BulkOrderResultis 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 togetSwapQuote.getTransactionReceipt(request)— fetch tx status.- New
TransactionsAPIsub-client.
Cleanup
- Helpers
getOrdersAPIPath,serializeOrdersQueryOptions,deserializeOrderremoved. - Types
OrderAPIOptions,OrdersQueryOptions,OrdersQueryResponse,OrdersPostQueryResponse,ListingPostQueryResponse,OfferPostQueryResponse,SerializedOrderV2,GetOrdersResponseremoved. IntervalStat.{volume_diff, volume_change, sales_diff, average_price}andStats.{market_cap, average_price}removed.
Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.3.1...sdk-v10.4.0
v10.3.1
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):
CrossChainListing→ListingObjectCrossChainFulfillmentDataRequest→CrossChainFulfillmentRequestCrossChainFulfillmentDataResponse→CrossChainFulfillmentResponseCrossChainTransaction→SwapTransactionResponse
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
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
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 toJSON.stringify.
New exports
TraitFilter—{ traitType, value }shape.GetEventsByCollectionArgs— extendsGetEventsArgswithtraits. Type-restricts the field to the collection endpoint, so the other event methods rejecttraitsat compile time.encodeTraitsParam— exposed for callers building requests directly (e.g. via the genericapi.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
What's Changed
Add token-groups and instant API key endpoints.
sdk.api.getTokenGroups({ limit?, cursor? })andsdk.api.getTokenGroup(slug)for the new/api/v2/token-groupsendpoints.OpenSeaSDK.requestInstantApiKey()andOpenSeaAPI.requestInstantApiKey()— static methods that callPOST /api/v2/auth/keyswithout 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.OpenSeaAPIclass is now exported from the package root (@opensea/sdkand@opensea/sdk/viem).
Patch
- Update
@opensea/seaport-jsfrom ^4.0.7 to ^4.1.1.
Full Changelog: ProjectOpenSea/opensea-devtools@sdk-v10.1.0...sdk-v10.2.0
v10.1.0
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