Somehow almost all the companies are from the US in /assets/search #29

Closed
opened 2026-03-05 07:24:51 +00:00 by fabioth · 1 comment
fabioth commented 2026-03-05 07:24:51 +00:00 (Migrated from gitlab.esvedra.one)

Examples:

symbol": "VLK.AS",
"name": "Van Lanschot Kempen N.V.",
"asset_type": "stock",
"currency": "USD",
"is_active": true,
"created_at": "2026-02-13T19:05:37.901000",
"updated_at": "2026-03-05T01:00:05.925000",
"source": "fmp",
"previous_symbols": [],
"exchange": "AMS",
"country": "US",
"full_country": "United States",

"symbol": "WKL.AS",
"name": "Wolters Kluwer N.V.",
"asset_type": "stock",
"currency": "USD",
"is_active": true,
"created_at": "2026-02-13T19:05:37.901000",
"updated_at": "2026-03-05T01:00:05.925000",
"source": "fmp",
"previous_symbols": [],
"exchange": "AMS",
"country": "US",
"full_country": "United States",

"symbol": "MBQ.DE", "name": "Mobotix AG", "asset_type": "stock", "currency": "USD", "is_active": true, "created_at": "2026-02-13T19:05:37.901000", "updated_at": "2026-03-05T01:00:05.925000", "source": "fmp", "previous_symbols": [], "exchange": "XETRA", "country": "US", "full_country": "United States",

Examples: **`symbol": "VLK.AS",`**\ **`"name": "Van Lanschot Kempen N.V.",`**\ **`"asset_type": "stock",`**\ **`"currency": "USD",`**\ **`"is_active": true,`**\ **`"created_at": "2026-02-13T19:05:37.901000",`**\ **`"updated_at": "2026-03-05T01:00:05.925000",`**\ **`"source": "fmp",`**\ **`"previous_symbols": [],`**\ **`"exchange": "AMS",`**\ **`"country": "US",`**\ **`"full_country": "United States",`** **`"symbol": "WKL.AS",`**\ **`"name": "Wolters Kluwer N.V.",`**\ **`"asset_type": "stock",`**\ **`"currency": "USD",`**\ **`"is_active": true,`**\ **`"created_at": "2026-02-13T19:05:37.901000",`**\ **`"updated_at": "2026-03-05T01:00:05.925000",`**\ **`"source": "fmp",`**\ **`"previous_symbols": [],`**\ **`"exchange": "AMS",`**\ **`"country": "US",`**\ **`"full_country": "United States",`** **`"symbol": "MBQ.DE", "name": "Mobotix AG", "asset_type": "stock", "currency": "USD", "is_active": true, "created_at": "2026-02-13T19:05:37.901000", "updated_at": "2026-03-05T01:00:05.925000", "source": "fmp", "previous_symbols": [], "exchange": "XETRA", "country": "US", "full_country": "United States",`**
project_1_bot_053fc026be1655bf3cd800152d0cdead commented 2026-03-05 10:07:42 +00:00 (Migrated from gitlab.esvedra.one)

Fixed in v0.9.1

Root cause: The nightly stock_list_refresh job runs FMP's /stock/list endpoint, which lacks currency/country fields. The adapter was defaulting to 'USD'/'US' when missing, and exclude_none=True couldn't skip them because they were non-None values — overwriting correct enriched values every refresh.

Solution (commit 75cdeb2):

  • Made BaseAsset.currency, Stock.country, ETF.country optional (nullable)
  • Adapter now uses None for missing fields instead of defaults
  • model_dump(exclude_none=True) correctly skips None from MongoDB $set
  • Preserves enriched values from /stock/list; updates from /profile/{symbol}

Result: Dutch stocks like VLK.AS/WKL.AS retain country/currency after next nightly refresh.

Deployed in v0.9.1.

Fixed in v0.9.1 Root cause: The nightly stock_list_refresh job runs FMP's /stock/list endpoint, which lacks currency/country fields. The adapter was defaulting to 'USD'/'US' when missing, and exclude_none=True couldn't skip them because they were non-None values — overwriting correct enriched values every refresh. Solution (commit 75cdeb2): - Made BaseAsset.currency, Stock.country, ETF.country optional (nullable) - Adapter now uses None for missing fields instead of defaults - model_dump(exclude_none=True) correctly skips None from MongoDB $set - Preserves enriched values from /stock/list; updates from /profile/{symbol} Result: Dutch stocks like VLK.AS/WKL.AS retain country/currency after next nightly refresh. Deployed in v0.9.1.
project_1_bot_053fc026be1655bf3cd800152d0cdead (Migrated from gitlab.esvedra.one) closed this issue 2026-03-05 10:07:44 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
gertjan/bodega#29
No description provided.