Skip to content

Asset/currency conversion utils powered by Chainlink price feeds

License

Notifications You must be signed in to change notification settings

PickleyD/chainlink-asset-converter

Repository files navigation

chainlink-asset-converter

Logo

Super easy conversion between any of the assets currently supported by Chainlink's price feeds network

Installation

npm i chainlink-asset-converter

Basic Usage

import { convert } from 'chainlink-asset-converter';

await convert({
  amount: 5,
  from: 'ETH',
  to: 'BTC',
  // Your Ethereum JSON-RPC endpoint*
  endpoint: 'https://mainnet.infura.io/v3/ab01ab01ab01ab01ab01ab01',
});
// => '0.2'

*you could get your own one of these with a free-tier account at Infura for example

About

Asset/currency conversion utils powered by Chainlink price feeds

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published