Feature/extend markets overview by benchmarks (#953)
* Add benchmarks to markets overview * Update changelog
This commit is contained in:
@@ -48,6 +48,7 @@ export const DEFAULT_DATE_FORMAT_MONTH_YEAR = 'MMM yyyy';
|
||||
|
||||
export const GATHER_ASSET_PROFILE_PROCESS = 'GATHER_ASSET_PROFILE';
|
||||
|
||||
export const PROPERTY_BENCHMARKS = 'BENCHMARKS';
|
||||
export const PROPERTY_COUPONS = 'COUPONS';
|
||||
export const PROPERTY_CURRENCIES = 'CURRENCIES';
|
||||
export const PROPERTY_IS_READ_ONLY_MODE = 'IS_READ_ONLY_MODE';
|
||||
|
10
libs/common/src/lib/interfaces/benchmark.interface.ts
Normal file
10
libs/common/src/lib/interfaces/benchmark.interface.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { EnhancedSymbolProfile } from './enhanced-symbol-profile.interface';
|
||||
|
||||
export interface Benchmark {
|
||||
name: EnhancedSymbolProfile['name'];
|
||||
performances: {
|
||||
allTimeHigh: {
|
||||
performancePercent: number;
|
||||
};
|
||||
};
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
import { AssetClass, AssetSubClass, DataSource } from '@prisma/client';
|
||||
|
||||
import { Country } from './country.interface';
|
||||
import { ScraperConfiguration } from './scraper-configuration.interface';
|
||||
import { Sector } from './sector.interface';
|
||||
|
||||
export interface EnhancedSymbolProfile {
|
||||
assetClass: AssetClass;
|
||||
assetSubClass: AssetSubClass;
|
||||
countries: Country[];
|
||||
createdAt: Date;
|
||||
currency: string | null;
|
||||
dataSource: DataSource;
|
||||
id: string;
|
||||
name: string | null;
|
||||
scraperConfiguration?: ScraperConfiguration | null;
|
||||
sectors: Sector[];
|
||||
symbol: string;
|
||||
symbolMapping?: { [key: string]: string };
|
||||
updatedAt: Date;
|
||||
}
|
@@ -6,7 +6,9 @@ import {
|
||||
AdminMarketData,
|
||||
AdminMarketDataItem
|
||||
} from './admin-market-data.interface';
|
||||
import { Benchmark } from './benchmark.interface';
|
||||
import { Coupon } from './coupon.interface';
|
||||
import { EnhancedSymbolProfile } from './enhanced-symbol-profile.interface';
|
||||
import { Export } from './export.interface';
|
||||
import { FilterGroup } from './filter-group.interface';
|
||||
import { Filter } from './filter.interface';
|
||||
@@ -24,8 +26,10 @@ import { PortfolioReportRule } from './portfolio-report-rule.interface';
|
||||
import { PortfolioReport } from './portfolio-report.interface';
|
||||
import { PortfolioSummary } from './portfolio-summary.interface';
|
||||
import { Position } from './position.interface';
|
||||
import { BenchmarkResponse } from './responses/benchmark-response.interface';
|
||||
import { ResponseError } from './responses/errors.interface';
|
||||
import { PortfolioPerformanceResponse } from './responses/portfolio-performance-response.interface';
|
||||
import { ScraperConfiguration } from './scraper-configuration.interface';
|
||||
import { TimelinePosition } from './timeline-position.interface';
|
||||
import { UniqueAsset } from './unique-asset.interface';
|
||||
import { UserSettings } from './user-settings.interface';
|
||||
@@ -39,7 +43,10 @@ export {
|
||||
AdminMarketData,
|
||||
AdminMarketDataDetails,
|
||||
AdminMarketDataItem,
|
||||
Benchmark,
|
||||
BenchmarkResponse,
|
||||
Coupon,
|
||||
EnhancedSymbolProfile,
|
||||
Export,
|
||||
Filter,
|
||||
FilterGroup,
|
||||
@@ -59,6 +66,7 @@ export {
|
||||
PortfolioSummary,
|
||||
Position,
|
||||
ResponseError,
|
||||
ScraperConfiguration,
|
||||
TimelinePosition,
|
||||
UniqueAsset,
|
||||
User,
|
||||
|
@@ -0,0 +1,5 @@
|
||||
import { Benchmark } from '../benchmark.interface';
|
||||
|
||||
export interface BenchmarkResponse {
|
||||
benchmarks: Benchmark[];
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
export interface ScraperConfiguration {
|
||||
defaultMarketPrice?: number;
|
||||
selector: string;
|
||||
url: string;
|
||||
}
|
Reference in New Issue
Block a user