UNPKG

trm-api

Version:

Tasa Representativa del Mercado API wrapper to simplify GET requests and JSON response parsing

26 lines (24 loc) 681 B
interface TrmApiQuote { valor: string; unidad: string; vigenciadesde: string; vigenciahasta: string; } declare class TrmApi { private trmApiUrl; private headers; constructor(appToken?: string); latest(): Promise<TrmApiQuote>; between({ startAt, endAt, order, }: { startAt: string; endAt: string; order?: "ASC" | "DESC"; }): Promise<TrmApiQuote[]>; history({ limit, order, }?: { order?: "ASC" | "DESC"; limit?: number; }): Promise<TrmApiQuote[]>; date(date: string): Promise<TrmApiQuote>; query(query: string): Promise<TrmApiQuote[]>; } export { type TrmApiQuote, TrmApi as default };