UNPKG

bitpay-sdk

Version:

Complete version of the NodeJS library for the new cryptographically secure BitPay API

26 lines (25 loc) 1.22 kB
import { RateInterface, Rates } from '../Model'; import { BitPayClient } from './BitPayClient'; export declare class RateClient { private bitPayClient; constructor(bitPayClient: BitPayClient); /** * Retrieve the rate for a cryptocurrency / fiat pair * * @param baseCurrency The cryptocurrency for which you want to fetch the fiat-equivalent rate. * @param currency The fiat currency for which you want to fetch the baseCurrency rate * @returns Rate A Rate object populated with the currency rate for the requested baseCurrency. * @throws BitPayGenericException BitPayGenericException class * @throws BitPayApiException BitPayApiException class */ getRate(baseCurrency: string, currency: string): Promise<RateInterface>; /** * Retrieve the exchange rate table maintained by BitPay. See https://bitpay.com/bitcoin-exchange-rates. * * @param currency * @returns Rates A Rates object populated with the currency rates for the requested baseCurrency. * @throws BitPayGenericException BitPayGenericException class * @throws BitPayApiException BitPayApiException class */ getRates(currency: string | null): Promise<Rates>; }