0.0.24-development • Published 1 year ago

@sp1r1don/test v0.0.24-development

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

multidata-oracle-sdk

SDK for multidata oracle

Installation

Using npm

$ npm install @unitprotocol/multidata-sdk

Using Yarn

$ yarn add debug @unitprotocol/multidata-sdk

Usage

import OracleReader from '@unitprotocol/multidata-sdk';

const reader = new OracleReader();

reader.getPriceById(1).then((resp) => console.log('resp', resp));

API

MethodReturn typeDescription
getMetricsPromise<Metric[]>Return all metrics properties
getPricesByIdsPromise<Price[]>Return price by id or name
getPriceByIdPromise<Price[]>Return price by id or name
getMetricsCountPromise\Return total metrics count
hasMetricPromise\Check if Metric exist