0.0.1 • Published 2 years ago

covalenthq-api v0.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

CovalentHQ API

Created as part of a SF ETHGlobal hackathon project.

Introduction

The Covalent Unified API can be used to pull balances, positions and historical granular transaction data from dozens of blockchain networks. This data enables hundreds of end-user use-cases like wallets, investor dashboards, taxation tools and as-of-yet unknown use-cases.

One Unified API. One Billion Possibilities.

Read more about this API on covalenthq.com.

Developer Resources

API Docs - Use the Covalent API directly from the browser with our API docs Knowledge Base - check out our developer support resources and details on every supported blockchain network.

Installation

npm i covalenthq-api

Example usage

https://api.covalenthq.com/v1/1/address/demo.eth/balances_v2/?quote-currency=USD&format=JSON&nft=false&no-nft-fetch=false&key=ckey_a1857bea207c449a95f55fcd188

import * as CovalentHQ from 'covalenthq-api';

(async () => {
  const covalentHQ = CovalentHQ.createAPI(API_KEY);

  // Get token balances for address
  const balances = await covalentHQ.getTokenBalancesForAddress(address, 1);

  console.log(balances);
})();

TODO

  • Add full suite of APIs, Class B
  • Add more examples
  • Add tests, test other chains
  • More documentation

© 2022, @winzeler