SPB Git

Repository Public

route.ts 2.2 KB 59 lines typescript

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : Vrai-Prix8 * File             : src/app/api/stats/marche/route.ts9 * Module           : app10 * Repository       : https://git.spboucher.ai/vrai-prix11 * Created          : 2026-11-2612 * Last Modified    : 2026-11-2613 *14 * Author           : Simon-Pierre Boucher15 * Position         : Professor of Finance16 * Institution      : Université du Québec en Outaouais (UQO)17 * Organization     : SP Boucher18 * Website          : https://spboucher.ai19 * Git              : https://git.spboucher.ai20 *21 * Preferred Contact: contact@spboucher.ai22 * Development      : dev@spboucher.ai23 * Support          : support@spboucher.ai24 * Security/Admin   : admin@spboucher.ai25 *26 * Copyright (c) 202627 * Simon-Pierre Boucher28 * All rights reserved where applicable. This file is governed by the29 * applicable project license, copyright notices and relevant law.30 * Existing third-party rights and notices remain unaffected.31 *32 * License          : None specified (no license file in this repository)33 *34 * Do not embed credentials, private keys, access tokens,35 * certificates or confidential personal information.36 *37 * =============================================================================38 * END OF SP BOUCHER SOURCE HEADER39 * =============================================================================40 */4142// GET /api/stats/marche — « la mesure à l'épreuve du marché » : le moteur43// confronté aux propriétés réellement à vendre (ratio estimation / prix44// demandé, erreur médiane, calibration de la confiance, par type, région,45// ville et tranche de prix). Mêmes données que la page /stats/marche ;46// recalculées chaque nuit.47import { loadMarcheStats } from "@/lib/marche-stats";48import { cache, erreur, json } from "@/lib/api";4950export const dynamic = "force-dynamic";5152export function GET() {53  try {54    return json(loadMarcheStats(), cache(600));55  } catch (err) {56    return erreur(500, (err as Error).message);57  }58}59
Files main
Menu

Theme