+ {aggregate.portfolios.map((portfolioSummary) => {
+ const allocation = buildBrokerAllocation({
+ account: {
+ id: 'aggregate',
+ type: 'brokerage',
+ name: 'aggregate',
+ status: 'ACCOUNT_STATUS_OPEN',
+ openedAt: null,
+ accessLevel: null,
+ },
+ positionCounts: { shares: 0, bonds: 0, etf: 0, other: 0 },
+ totals: {
+ shares: {
+ currency: portfolioSummary.currency,
+ units: '0',
+ nano: 0,
+ value: portfolioSummary.allocation.shares,
+ },
+ bonds: {
+ currency: portfolioSummary.currency,
+ units: '0',
+ nano: 0,
+ value: portfolioSummary.allocation.bonds,
+ },
+ etf:
+ portfolioSummary.allocation.etf > 0
+ ? {
+ currency: portfolioSummary.currency,
+ units: '0',
+ nano: 0,
+ value: portfolioSummary.allocation.etf,
+ }
+ : null,
+ currencies: {
+ currency: portfolioSummary.currency,
+ units: '0',
+ nano: 0,
+ value: portfolioSummary.allocation.cash,
+ },
+ futures: null,
+ options: null,
+ structuredProducts: null,
+ dfa: null,
+ portfolio: {
+ currency: portfolioSummary.currency,
+ units: '0',
+ nano: 0,
+ value: portfolioSummary.total,
+ },
+ },
+ yields: { expectedPercent: null, daily: null, dailyPercent: null },
+ cash: [],
+ blockedCash: [],
+ asOf: '',
+ });
+
+ return (
+
+
+
+ {portfolioSummary.currency}
+
+
+ {formatBrokerCurrencyValue(portfolioSummary.currency, portfolioSummary.total)}
+
+
+
+
+
- За день
+ -
+ {formatBrokerSignedCurrencyValue(
+ portfolioSummary.currency,
+ portfolioSummary.daily,
+ )}
+
+
+
+
- Динамика
+ - {formatBrokerSignedPercent(portfolioSummary.dailyPercent)}
+
+
+
- Свободные деньги
+ -
+ {formatBrokerCurrencyValue(
+ portfolioSummary.currency,
+ aggregate.cash.find((cash) => cash.currency === portfolioSummary.currency)
+ ?.value ?? 0,
+ )}
+
+
+
+
+
+ );
+ })}
+
+