GithubHelp home page GithubHelp logo

muhammadsamir11 / providers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allmywallets/providers

0.0 0.0 0.0 1.89 MB

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

Home Page: https://www.npmjs.com/package/@allmywallets/providers

License: MIT License

JavaScript 99.74% Shell 0.26%

providers's Introduction

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

providers's People

Contributors

coac avatar dependabot[bot] avatar quentinus95 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.