You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ghostfolio/apps/api/src/services/exchange-rate-data/exchange-rate-data.service....

30 lines
651 B

export const ExchangeRateDataServiceMock = {
getExchangeRatesByCurrency: ({
currencies,
endDate,
startDate,
targetCurrency
}): Promise<any> => {
if (targetCurrency === 'CHF') {
return Promise.resolve({
CHFCHF: {
'2015-01-01': 1,
'2017-12-31': 1,
'2018-01-01': 1,
'2023-01-03': 1,
'2023-07-10': 1
},
USDCHF: {
'2015-01-01': 0.9941099999999999,
'2017-12-31': 0.9787,
'2018-01-01': 0.97373,
'2023-01-03': 0.9238,
'2023-07-10': 0.8854
}
});
}
return Promise.resolve({});
}
};