fix(tradein): correct EKB/MSK REF_AREA codes to 66/77 (#794)

This commit is contained in:
bot-backend 2026-05-31 16:50:46 +03:00
parent 9d945d3b63
commit 4138584de1

View file

@ -26,10 +26,12 @@ It is a client-visible change that requires a backtest gate. Defer to a separate
REF_AREA codes (sberindex internal region IDs, not ОКАТО/ISO): REF_AREA codes (sberindex internal region IDs, not ОКАТО/ISO):
643 = Россия confirmed live, vault research note 2026-05-31-0845. 643 = Россия confirmed live, vault research note 2026-05-31-0845.
8 = Свердловская область verified 2026-05-31 via dynpage form REF_AREA codelist; 66 = Свердловская область verified 2026-05-31 brute-force against /api/sowa
real_estate_deals: 2017-01 61 632 2026-04 146 329 руб/м². (region name from ref_area field of response);
47 = Москва verified 2026-05-31 via dynpage form REF_AREA codelist; real_estate_deals: 2017-01 51 046 2026-04 128 443 руб/м².
real_estate_deals: 2017-01 211 194 2026-04 374 030 руб/м². 77 = Москва verified 2026-05-31 brute-force against /api/sowa
(region name from ref_area field of response);
real_estate_deals: 2017-01 148 471 2026-04 309 510 руб/м².
""" """
from __future__ import annotations from __future__ import annotations
@ -53,12 +55,12 @@ logger = logging.getLogger(__name__)
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# REF_AREA code → city label used as the primary key in sber_price_index. # REF_AREA code → city label used as the primary key in sber_price_index.
# Codes confirmed 2026-05-31 via /api/dynpage/ru/dashboards/real_estate_deals # Codes verified 2026-05-31 by brute-force scan against /api/sowa
# → form field «REF_AREA» codelist (sberindex internal region IDs, not ОКАТО/ISO). # (region name taken from ref_area field of API response; not ОКАТО/ISO).
SBER_REF_AREAS: dict[str, str] = { SBER_REF_AREAS: dict[str, str] = {
"643": "Россия", "643": "Россия",
"8": "Свердловская область", "66": "Свердловская область",
"47": "Москва", "77": "Москва",
} }
# Dashboards to pull: slug → human label (used as 'segment' placeholder) # Dashboards to pull: slug → human label (used as 'segment' placeholder)