Browse Source

Feature/improve symbol lookup in Trackinsight service (#4377)

* Improve symbol lookup for EXCHANGE:SYMBOL pattern

* Update changelog
pull/4355/head^2
Thomas Kaul 3 weeks ago
committed by GitHub
parent
commit
a8d1248461
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      CHANGELOG.md
  2. 5
      apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts

6
CHANGELOG.md

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Changed
- Improved the symbol lookup in the _Trackinsight_ data enhancer for asset profile data
## 2.142.0 - 2025-02-28
### Added

5
apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts

@ -192,7 +192,10 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface {
.then((jsonRes) => {
if (
jsonRes['results']?.['count'] === 1 ||
jsonRes['results']?.['docs']?.[0]?.['ticker'] === symbol
// Allow exact match
jsonRes['results']?.['docs']?.[0]?.['ticker'] === symbol ||
// Allow EXCHANGE:SYMBOL
jsonRes['results']?.['docs']?.[0]?.['ticker']?.endsWith(`:${symbol}`)
) {
return jsonRes['results']['docs'][0]['ticker'];
}

Loading…
Cancel
Save