orakl-price-api-wrapper
v0.0.2
Published
Price feed wrapper for [Orakl Network](https://orakl.network)
Downloads
3
Readme
orakl-price-api-wrapper
Price feed wrapper for Orakl Network
Installation
Install with package manager
npm i orakl-price-api-wrapper
yarn add orakl-price-api-wrapper
Usage/Examples
const feedWrapper = new OraklPriceFeed({
chainId: 8217,
});
const result = await feed.getAllFeeds(["TRX-USDT", "BTC-USDT"]);
console.log(result);
/* result
[
{
feedName: 'TRX-USDT',
price: '11284500',
startedAt: '1706686297',
updatedAt: '1706686297',
roundId: '18446744073710786048'
},
{
feedName: 'BTC-USDT',
price: '4298706000000',
startedAt: '1706686309',
updatedAt: '1706686309',
roundId: '18446744073710787399'
},
*/
API Reference
Get all Feeds
feed.getAllFeeds(["BTC-USDT"]);
| Parameter | Type | Description |
| :---------- | :--------- | :---------------------------- |
| feedNames
| string[]
| Required. data feed names |