Module to analyse ERC20-Token balance of address
This is a library for calculating the profit or loss of ETH-addresses.
This is a non-profit & opensource project for developers. If you want to use this project for commercial goals, you need to buy commercial API (for third party services).
npm i erc20-analyser
import { ERC20Analyser } from 'erc20-analyser';
const cryptocompareToken = 'your-cryptocompare-api-token';
const etherscanToken = 'your-etherscan-api-token';
const analyser = new ERC20Analyser(cryptocompareToken, etherscanToken);
analyser.getERC20TokenBalanceWithHold('0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B').then(data => {
console.log(data);
});
analyser.getCurrentEthBalance('0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B').then(data => {
console.log(data);
});
analyser.getInTransactions('0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B').then(data => {
console.log(data);
});
analyser.getOutTransactions('0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B').then(data => {
console.log(data);
});
analyser.getPriceToken({tokenSymbol: 'WAVES', timestamp: 1546300800, toConvert: 'ETH'}).then(data => {
console.log(data);
});
analyser.getCurrentPriceToken('BNB', 'ETH').then(data => {
console.log(data);
});
analyser.getResultErc20Transactions('0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B', '0xe25b0bba01dc5630312b6a21927e578061a13f55').then(data => {
console.log(data);
});