80 lines
2.0 KiB
TypeScript
80 lines
2.0 KiB
TypeScript
import type { Portfolio } from "@/entities/portfolio";
|
|
|
|
const portfolio
|
|
= {
|
|
cashBalances: [{ currency: "USD", value: "1" }],
|
|
isStale: true,
|
|
lastSuccessfulAt: "2026-08-13T10:00:00Z",
|
|
positions: [
|
|
{
|
|
absoluteReturn: { currency: "RUB", value: "10" },
|
|
averagePurchasePrice: null,
|
|
currentValue: { currency: "RUB", value: "100" },
|
|
displayName: "Акция",
|
|
figi: "FIGI-STOCK",
|
|
isin: null,
|
|
issuer: null,
|
|
logoName: "akciya.png",
|
|
quantity: "2",
|
|
sector: null,
|
|
ticker: null,
|
|
type: "STOCK",
|
|
},
|
|
{
|
|
absoluteReturn: { currency: "RUB", value: "-5" },
|
|
averagePurchasePrice: { currency: "RUB", value: "45" },
|
|
currentValue: { currency: "RUB", value: "50" },
|
|
displayName: "Облигация",
|
|
figi: "FIGI-BOND",
|
|
isin: "RU000A0JX0J2",
|
|
issuer: null,
|
|
logoName: null,
|
|
quantity: "1",
|
|
sector: null,
|
|
ticker: null,
|
|
type: "BOND",
|
|
},
|
|
{
|
|
absoluteReturn: null,
|
|
averagePurchasePrice: null,
|
|
currentValue: null,
|
|
displayName: "Фонд",
|
|
figi: "FIGI-FUND",
|
|
isin: null,
|
|
issuer: null,
|
|
logoName: "fond.png",
|
|
quantity: "3",
|
|
sector: null,
|
|
ticker: null,
|
|
type: "FUND",
|
|
},
|
|
] satisfies [Portfolio["positions"][number], ...Portfolio["positions"]],
|
|
structure: { currencies: [], unvaluedCategories: [] },
|
|
totalsByCurrency: [{ currency: "RUB", value: "150" }],
|
|
} satisfies Portfolio;
|
|
|
|
const position: Portfolio["positions"][number] = {
|
|
...portfolio.positions[0],
|
|
absoluteReturn: { currency: "RUB", value: "25" },
|
|
account: { id: "a", name: "Основной" },
|
|
averagePurchasePrice: { currency: "RUB", value: "280" },
|
|
currentValue: { currency: "RUB", value: "375" },
|
|
displayName: "Сбербанк",
|
|
figi: "FIGI-SBER",
|
|
isin: "RU0009029540",
|
|
logoName: null,
|
|
quantity: "1.25",
|
|
ticker: "SBER",
|
|
};
|
|
|
|
const second = {
|
|
...position,
|
|
absoluteReturn: null,
|
|
account: { id: "b", name: "ИИС" },
|
|
averagePurchasePrice: null,
|
|
currentValue: null,
|
|
quantity: "-2",
|
|
};
|
|
|
|
export { portfolio, position, second };
|