Real-time Activity Feed

node v10.22.1
version: 1.0.0
endpointsharetweet
const Web3Data = require("web3data-js@0.6.1") // Create the Web3Data instances passing in your API Key (Get one! -> amberdata.io/onboarding) const w3d = new Web3Data(process.env.API_KEY) const ADDRESS = '0x3f5ce5fbfe3e9af3971dd833d26ba9b5c936f0be' // Initialize the connection w3d.connect() // Subscribes to all transactions events w3d.on({eventName: 'address:transactions', filters: {address: ADDRESS}}, transaction => { // Log the transaction data console.log(transaction) }) // Subscribes to all token transfer events w3d.on({eventName: 'address:token_transfer', filters: {address: ADDRESS}}, tokenTransfer => { // Log the token transfer data console.log(tokenTransfer) })
Loading…

no comments

    sign in to comment