eth_newPendingTransactionFilter
Creates a filter in the node to notify when new pending transactions arrive on the Chiliz network.
Parameters
None (this method takes no parameters)
Returns
Returns a filter ID as a hexadecimal string. This ID can be used with eth_getFilterChanges
to retrieve pending transaction hashes.
Implementation Example
Examples
- cURL
- JavaScript
- Python
curl -X POST https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_newPendingTransactionFilter",
"params": [],
"id": 1
}'
const response = await fetch('https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_newPendingTransactionFilter',
params: [],
id: 1
})
});
const data = await response.json();
console.log('Filter ID:', data.result);
import requests
import json
url = 'https://api-chiliz-mainnet-archive.n.dwellir.com/YOUR_API_KEY'
headers = {'Content-Type': 'application/json'}
payload = {
"jsonrpc": "2.0",
"method": "eth_newPendingTransactionFilter",
"params": [],
"id": 1
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
data = response.json()
print('Filter ID:', data['result'])
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x17"
}
Notes
- The returned filter ID is used with
eth_getFilterChanges
to poll for new pending transactions - Filters automatically expire after a period of inactivity (typically 5 minutes)
- Use
eth_uninstallFilter
to manually remove the filter when no longer needed - Each call to
eth_getFilterChanges
returns only transaction hashes added to the pending pool since the last poll
Need help? Contact our support team or check the Chiliz documentation.