mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
982 B
47 lines
982 B
import { PortfolioDetails, PortfolioPosition } from '..';
|
|
import { Market } from '../../types';
|
|
|
|
export interface PublicPortfolioResponse extends PublicPortfolioResponseV1 {
|
|
alias?: string;
|
|
hasDetails: boolean;
|
|
holdings: {
|
|
[symbol: string]: Pick<
|
|
PortfolioPosition,
|
|
| 'allocationInPercentage'
|
|
| 'assetClass'
|
|
| 'countries'
|
|
| 'currency'
|
|
| 'dataSource'
|
|
| 'dateOfFirstActivity'
|
|
| 'markets'
|
|
| 'name'
|
|
| 'netPerformancePercentWithCurrencyEffect'
|
|
| 'sectors'
|
|
| 'symbol'
|
|
| 'url'
|
|
| 'valueInBaseCurrency'
|
|
| 'valueInPercentage'
|
|
>;
|
|
};
|
|
markets: {
|
|
[key in Market]: Pick<
|
|
PortfolioDetails['markets'][key],
|
|
'id' | 'valueInPercentage'
|
|
>;
|
|
};
|
|
}
|
|
|
|
interface PublicPortfolioResponseV1 {
|
|
createdAt: Date;
|
|
performance: {
|
|
'1d': {
|
|
relativeChange: number;
|
|
};
|
|
max: {
|
|
relativeChange: number;
|
|
};
|
|
ytd: {
|
|
relativeChange: number;
|
|
};
|
|
};
|
|
}
|
|
|