nowpayments-api-typescript
Version:
Nowpayments typescript API wrapper
20 lines (15 loc) • 423 B
text/typescript
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;