UNPKG

rubic-sdk-next

Version:
20 lines (19 loc) 636 B
import BigNumber from 'bignumber.js'; import { BlockchainName } from '../blockchain/models/blockchain-name'; import { HttpClient } from '../http-client/models/http-client'; /** * Works with coingecko api to get tokens prices in usd. */ export declare class CoingeckoApi { private readonly httpClient; constructor(httpClient: HttpClient); private getTokenPriceFromBackend; /** * Gets price of common token or native coin in usd from coingecko. * @param token Token to get price for. */ getTokenPrice(token: { address: string; blockchain: BlockchainName; }): Promise<BigNumber>; }