> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Subscriptions | Polygon

> Polygon web3.js subscription methods — subscribe to new block headers, pending transactions, contract events, and other real-time blockchain updates.

> [!NOTE]
>
> Note that all subscriptions require a WebSocket connection.

## Native EVM subscriptions

Developers can use the following native methods to subscribe to events:

> [card] [eth\_subscribe('newHeads')](https://docs.chainstack.com/reference/polygon-native-subscribe-newheads.md)

> [card] [eth\_subscribe('newPendingTransactions')](https://docs.chainstack.com/reference/polygon-native-subscribe-newpendingtransactions.md)

> [card] [eth\_subscribe('logs')](https://docs.chainstack.com/reference/polygon-native-subscribe-logs.md)

The subscriptions created can be cleared using the following method:

> [card] [eth\_unsubscribe](https://docs.chainstack.com/reference/polygon-native-unsubscribe.md)

## web3.js subscriptions

The [web3.js](https://web3js.readthedocs.io/en/v1.2.11/getting-started.html) library also offers subscription methods. web3.js subscriptions are the successors of the deprecated `web3.eth.filter` methods and provide a way for developers to receive real-time updates about events on the blockchain without constantly polling the blockchain for new data.

Subscriptions can be created using one of the following methods:

> [card] [subscribe('newBlockHeaders')](https://docs.chainstack.com/reference/polygon-subscribenewblockheaders.md)

> [card] [subscribe('pendingTransactions')](https://docs.chainstack.com/reference/polygon-subscribependingtransactions.md)

> [card] [subscribe('logs')](https://docs.chainstack.com/reference/polygon-subscribelogs.md)

> [card] [subscribe('syncing')](https://docs.chainstack.com/reference/polygon-subscribesyncing.md)

The subscriptions created can be cleared using the following method:

> [card] [clearSubscriptions](https://docs.chainstack.com/reference/polygon-clearsubscriptions.md)
