0%
SupportSubscription API
How Pending Transaction WebSockets Subscription Work

How Pending Transaction WebSockets Subscription Work

Written by Author headshotKilliane Menand
Published on October 8, 20241 min read

When using the alchemy_pendingTransactions method to listen for pending transactions, it’s important to understand which transactions will be captured.

Yes, when you set up a WebSocket using alchemy_pendingTransactions, you will only receive pending transactions that are sent through Alchemy’s nodes. This is because pending transactions exist in the mempool of individual nodes, and Alchemy can only monitor and capture the transactions that pass through its own infrastructure.

Pending transactions are stored in the mempool of each node individually, and there’s no global access to mempools across all nodes in the network. Therefore, it’s impossible for any provider, including Alchemy, to capture all pending transactions across every node’s mempool on the global blockchain network.

Once a pending transaction is mined and added to a block, it becomes part of the canonical chain. At that point, all nodes, including Alchemy, will eventually recognize and store that transaction. Therefore, mined transactions are visible across all nodes, regardless of which node originally saw the pending transaction.

By using alchemy_pendingTransactions, you’ll receive pending transactions passing through Alchemy’s nodes. However, for a complete picture, once these transactions are mined, they will be visible across the entire blockchain network!

📘 For more details on how the Subscription API works with pending transactions, visit our documentation.

Was this article helpful?
Share:
Banner background image

Not finding what you need?