UNPKG

nowpayments-api-typescript

Version:
20 lines (15 loc) 423 B
import ApiConnection from './../utils/api-connection'; import { IError } from './../interfaces'; export interface GetCurrenciesResponse { currencies: [string]; } const getCurrencies = async ({ apiKey, }: { apiKey: string; }): Promise<GetCurrenciesResponse | IError> => { const api = new ApiConnection({ apiKey }); const { data } = await api.get('/currencies'); return data; }; export default getCurrencies;