Streaming the OpenSea

Today we’re launching a beta version the OpenSea Stream API, a new websocket-based service that enables developers to receive events as they occur across our marketplace.

With the massive growth in the NFT ecosystem, we know that it’s becoming increasingly challenging to rely solely on our REST APIs to stay up-to-date across a growing number of items and collections. The need to continuously poll these endpoints to refresh the data in your service can be resource-intensive and inefficient.

We’ve built the Stream API to better support a range of use cases that rely on dynamic data, such as price fluctuation, listings, bids, and ownership changes. Instead of polling for updates, you can subscribe to receive events as they occur - whether for specific collections or globally across the entire OpenSea marketplace.

The Stream API makes it easier to build many new features, such as:

  • A push notifications service that alerts people when they receive new bids on their listing
  • An activity feed that provides a timeline of sales of NFTs from a specific collection
  • A real-time dashboard that enables people to visualize and track key trends and metrics
  • A display of NFTs that have recently had their metadata updated. Examples of metadata updates include changes to title, description, and image.
Discord server using Stream API
Discord server using Stream API

With this beta launch, we’re providing a JavaScript SDK that provides a simple way to manage connections and individual subscribers to the Stream API and its various events. And as an example of what’s possible, we’ve also built a new tool that leverages the Stream API to automatically post updates to Discord which you can clone on GitHub.

We’re excited to get this beta version in the hands of the ecosystem and we’ll continue to iterate and improve upon the Stream API during beta period. To get started, check out our Stream API developer documentation which will walk through setup and using our SDK. Please let us know what you think and share your feedback, questions, and issues in our Developers channel in Discord.

We can’t wait to see what you build!

FAQs

Do the events received from my subscriptions count towards any rate limits on my API key?

No, events are not counted towards any API rate limits.

What is the typical streaming rate that I should expect from the Stream API?

The streaming rate depends on a range of factors - from the amount of collections that you’re monitoring to the type and amount of events that you’re subscribed to. For instance, if you’re subscribed to receive bid events across all collections on OpenSea, you’ll be receiving messages at a significantly higher rate than you will for a subscription to order cancellations on a small collection.

Should I expect that some events can be received out of order?

You should be prepared to handle receipt of events out of order as we don’t guarantee delivery of events in the order that they occur. Payloads include the event_timestamp field, which represents the time at which the event occurred and is the most definitive resource in determining order. We also include a sent_at field that refers to the time at which we sent the message out through the websocket.

Is it possible for some events to be missing?

The Stream API is a best-effort delivery messaging system and messages that are not received due to connection errors will not be re-sent. So it’s possible that there can be missing messages if the socket connection is unstable.

What blockchains does the Stream API support?

The following blockchains are supported on Mainnet networks:

  • Ethereum
  • Polygon mainnet
  • Klaytn mainnet
  • Solana mainnet

The following blockchains are supported on Testnet networks:

  • Rinkeby
  • Polygon testnet (Mumbai)
  • Klaytn testnet (Baobab)
Subscribe to OpenSea for Developers
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.