Create an instance of the OpenSea API
OpenSeaAPIConfig for setting up the API, including an optional API key, Chain name, and base URL
Optional
logger: ((arg) => void)Optional function for logging debug strings before and after requests are made
Readonly
apiBase url for the API
Logger function to use when debugging
Default size to use for fetching orders
Build a OpenSea collection offer.
The wallet address which is creating the offer.
The number of NFTs requested in the offer.
The slug (identifier) of the collection to build the offer for.
The BuildOfferResponse returned by the API.
Generate the data needed to fulfill a listing or an offer onchain.
The wallet address which will be used to fulfill the order
The hash of the order to fulfill
The address of the seaport contract
The FulfillmentDataResponse
The side of the order (buy or sell)
Gets all listings for a given collection.
The slug of the collection.
Optional
limit: numberThe number of listings to return. Must be between 1 and 100. Default: 100
Optional
next: stringThe cursor for the next page of results. This is returned from a previous request.
The GetListingsResponse returned by the API.
Gets all offers for a given collection.
The slug of the collection.
Optional
limit: numberThe number of offers to return. Must be between 1 and 100. Default: 100
Optional
next: stringThe cursor for the next page of results. This is returned from a previous request.
The GetOffersResponse returned by the API.
Fetch an asset.
The asset's contract address.
The asset's token ID, or null if ERC-20
Number of times to retry if the service is unavailable for any reason
The OpenSeaAsset returned by the API.
Use getNFT for multichain capabilities.
An error if the function is called on an unsupported chain.
Fetch a list of assets.
Options to filter the list returned.
The GetAssetsResponse returned by the API.
Use getNFTsByContract or getNFTsByCollection for multichain capabilities.
An error if the function is called on an unsupported chain.
Gets the best listing for a given token.
The slug of the collection.
The token identifier.
The GetBestListingResponse returned by the API.
Gets the best offer for a given token.
The slug of the collection.
The token identifier.
The GetBestOfferResponse returned by the API.
Fetch a bundle from the API.
The bundle's identifier
The OpenSeaAssetBundle returned by the API. If not found, returns null.
Fetch list of bundles from the API.
Query to use for getting bundles. See OpenSeaAssetBundleQuery.
Page number to fetch. Defaults to 1.
The GetBundlesResponse returned by the API.
Fetch an OpenSea collection.
The slug (identifier) of the collection.
The OpenSeaCollection returned by the API.
Get a list collection offers for a given slug.
The slug (identifier) of the collection to list offers for
Number of times to retry if the service is unavailable for any reason.
The ListCollectionOffersResponse returned by the API.
Fetch metadata, traits, ownership information, and rarity for a single NFT.
The NFT's chain.
The NFT's contract address.
the identifier of the NFT (i.e. Token ID)
Number of times to retry if the service is unavailable for any reason
The GetNFTResponse returned by the API.
Fetch NFTs owned by an account.
The address of the account
The number of NFTs to retrieve. Must be greater than 0 and less than 51.
Cursor to retrieve the next page of NFTs
Number of times to retry if the service is unavailable for any reason.
The chain to query. Defaults to the chain set in the constructor.
The ListNFTsResponse returned by the API.
Fetch multiple NFTs for a collection.
The slug (identifier) of the collection
The number of NFTs to retrieve. Must be greater than 0 and less than 51.
Cursor to retrieve the next page of NFTs
Number of times to retry if the service is unavailable for any reason.
The ListNFTsResponse returned by the API.
Fetch multiple NFTs for a contract.
The NFT's chain.
The NFT's contract address.
The number of NFTs to retrieve. Must be greater than 0 and less than 51.
Cursor to retrieve the next page of NFTs.
Number of times to retry if the service is unavailable for any reason.
The ListNFTsResponse returned by the API.
Gets a list of orders from API based on query options.
The GetOrdersResponse returned by the API.
Fetch list of fungible tokens.
Query to use for getting tokens. See OpenSeaFungibleTokenQuery.
Page number to fetch. Defaults to 1.
Number of times to retry if the service is unavailable for any reason.
The GetPaymentTokensResponse returned by the API.
An error if the function is called on an unsupported chain.
Generic post method for any API endpoint.
The response from the API.
Path to URL endpoint under API
Optional
body: objectData to send.
Optional
opts: ConnectionInfoethers ConnectionInfo, similar to Fetch API.
Post a collection offer to OpenSea.
The collection offer to post.
The slug (identifier) of the collection to post the offer for.
Number of times to retry if the service is unavailable for any reason.
The Offer returned to the API.
Post an order to OpenSea.
The order to post
Optional
retries?: numberNumber of times to retry if the service is unavailable for any reason.
The OrderV2 posted to the API.
Force refresh the metadata for an NFT.
The chain where the NFT is located.
The address of the NFT's contract.
The identifier of the NFT.
Number of times to retry if the service is unavailable for any reason.
The response from the API.
Generated using TypeDoc
The API class for the OpenSea SDK.