Rate history chart and pension contribution calculator

Analytics gains a 90-day USD/CRC buy/sell chart from the existing
history endpoint (wishlist: rate history). Pensiones gains a
Calculadora de Aporte: fund + target amount + target age → required
monthly contribution via the annuity future-value formula, using the
fund's live balance and configured rate (wishlist: contribution
calculator).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Carlos Escalante
2026-06-12 16:59:29 -06:00
parent fe62e50a85
commit 84f0256b7c
3 changed files with 170 additions and 2 deletions

View File

@@ -337,3 +337,10 @@ export type UserSettingsData = Record<string, unknown>;
export type UserSettingsRead = Schema<'UserSettingsRead'>;
export const getUserSettings = () => api.get<UserSettingsRead>('/settings/');
// --- Exchange Rate ---
export type ExchangeRatePoint = Schema<'ExchangeRateRead'>;
export const getRateHistory = (days = 90) =>
api.get<ExchangeRatePoint[]>('/exchange-rate/history', { params: { days } });