1.6.0 • Published 3 years ago

@allmywallets/providers v1.6.0

Weekly downloads
65
License
MIT
Repository
github
Last release
3 years ago

Providers

Library to retrieve balances and transactions from a variety of cryptocurrencies explorers and exchanges

npm (scoped)

Installation

npm install @allmywallets/providers

Usage

Cryptocurrency provider

const Provider = require('@allmywallets/providers').providers['ethereum.etherscan']
const provider = new Provider({ apiKey: process.env.ETHERSCAN_API_KEY });

(async function () {
  const res = await provider
    .address('0x2f5218c475f152152ac9787db76b9eea7e59c3d8')
    .fetch(['transactions', 'balances'])
    .exec()

  console.log(res[0].balances)
}()).catch(console.log)

You can run the code above

node demo.js

DeFi provider

const BSCDeFi = require('@allmywallets/providers').providers['bsc.defi']
const defi = new BSCDeFi();

(async function () {
  const platforms = ['pancakeSwap']
  const platformPools = await defi
    .address('0x91766b9e7c125e48714c63ed76d3c98ddd633da0')
    .platforms(platforms)
    .exec()

  console.log(platformPools)
}()).catch(console.log)

Run the tests

Make sure to set up your env vars

  • YOBIT_API_KEY
  • YOBIT_SECRET
  • CRYPTOID_API_KEY
  • ETHERSCAN_API_KEY
npm test
1.6.0

3 years ago

1.5.0

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago