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:
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!
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:
The following blockchains are supported on Testnet networks: