I want to get list of transactions by address and found example using web3.eth.subscribe. I wrote simple code from example
const Web3 = require('web3')
const web3 = new Web3(new Web3.providers.WebsocketProvider('ws://localhost:8546'))
web3.eth.subscribe('logs', options, function (err, res) {
if (err)
console.log(err)
console.log(res)
})
.on("data", function(log){
console.log(log)
})
.on("changed", function(log){
console.log(log)
})
.on('error', function (err) {
console.log(err)
})
but i dont get nothing. No console info or something like this.