UNPKG

@onekeyfe/blockchain-libs

Version:
16 lines (15 loc) 722 B
import { RestfulRequest } from '../../basic/request/restful'; import { CoinInfo } from '../../types/chain'; import { Price, PriceChannel } from '../interfaces'; declare class Coingecko implements PriceChannel { static readonly FIATS: Set<string>; readonly restfuls: Array<RestfulRequest>; private lastIndex; constructor(); fetchApi(path: string, params?: Record<string, any>): Promise<Response>; fetchBTCPrices(): Promise<Array<Price>>; fetchCGKIdsPrices(cgkIds: Record<string, string>, unit?: string): Promise<Array<Price>>; fetchERC20Prices(coins: Array<CoinInfo>, unit?: string): Promise<Array<Price>>; pricing(coins: Array<CoinInfo>): Promise<Array<Price>>; } export { Coingecko };