@sambruca/xe-client
Version:
Node client for interactive with XE API
39 lines (38 loc) • 856 B
TypeScript
import { AxiosError } from "axios";
export interface ITo {
quotecurrency: string;
mid: number;
}
export interface IRatesResponse {
amount: number;
to: ITo[];
from: string;
timestamp: Date;
}
export interface IRate {
from: string;
to: string;
timestamp: Date;
rate: number;
}
export interface IXEClientRatesResult {
requestsRemaining: number;
rates: IRate[];
}
export interface ICCY {
ccy: string;
label: string;
}
export declare class XERequestError implements Error {
name: string;
message: string;
private query;
private path;
private xeResponse;
constructor(query: Record<string, string | Date | number>, path: string, xeResponse: AxiosError);
}
export declare class InvalidCCYError implements Error {
name: string;
message: string;
constructor(ccy: string);
}