Bitcoin, Ethereum, Litecoin, Bitcoin SV & Cash Websockets - Address Transactions

node v10.22.1
version: 6.0.0
endpointsharetweet
const apiKey = 'YOUR_API_KEY' const Web3Data = require("web3data-js") const w3dBtc = new Web3Data(apiKey, { blockchainId: '408fa195a34b533de9ad9889f076045e' }) const w3dEth = new Web3Data(apiKey, { blockchainId: '1c9c969065fcd1cf' }) const w3dLtc = new Web3Data(apiKey, { blockchainId: 'f94be61fd9f4fa684f992ddfd4e92272' }) const w3dBsv = new Web3Data(apiKey, { blockchainId: 'a818635d36dbe125e26167c4438e2217' }) const w3dBch = new Web3Data(apiKey, { blockchainId: '43b45e71cc0615b491cb699e7071fc06' }) const BtcAddress = '3B1QXUYywcGYJ4TxWDvbtuGfAAL6PnHLLf' const EthAddress = '0x5A0b54d5dc17e0AADC383d2DB43b0A0d3e029c4C' const LtcAddress = 'LMwbA2fKM9CGQMttVT6E4SgQ1qPP31Py3J' const BsvAddress = '17UtXPuj2dQDxdqFf1kJgeb1mR7s7nE2qX' const BchAddress = 'qzzkmd537qgnn5uh2j8eesx9ekt0f27dps8eucexdd' // Initialize the connection, Subscribes to address transaction events w3dBtc.connect() w3dBtc.on({eventName: 'address:transactions', filters: {address: BtcAddress}}, transaction => { console.log('BTC Address Txn:', transaction) }) // Initialize the connection, Subscribes to address transaction events w3dEth.connect() w3dEth.on({eventName: 'address:transactions', filters: {address: EthAddress}}, transaction => { console.log('ETH Address Txn:', transaction) }) // Initialize the connection, Subscribes to address transaction events w3dLtc.connect() w3dLtc.on({eventName: 'address:transactions', filters: {address: LtcAddress}}, transaction => { console.log('LTC Address Txn:', transaction) }) // Initialize the connection, Subscribes to address transaction events w3dBsv.connect() w3dBsv.on({eventName: 'address:transactions', filters: {address: BsvAddress}}, transaction => { console.log('BSV Address Txn:', transaction) }) // Initialize the connection, Subscribes to address transaction events w3dBch.connect() w3dBch.on({eventName: 'address:transactions', filters: {address: BchAddress}}, transaction => { console.log('BCH Address Txn:', transaction) })
Loading…

no comments

    sign in to comment