diff --git a/CHANGELOG.md b/CHANGELOG.md index 905b71a2..1e4e2269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ 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 +## 2.155.0 - 2025-04-23 ### Added @@ -13,7 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Simplified the data source check in the DTO of the activity creation +- Simplified the data source check in the DTO of the asset profile update - Renamed `User` to `user` in the `Subscription` database schema +- Migrated the `@ghostfolio/ui/assistant` component to control flow +- Migrated the `@ghostfolio/ui/value` component to control flow + +### Fixed + +- Fixed an issue in the settings dialog to customize the rule thresholds of the _X-ray_ page (experimental) ## 2.154.0 - 2025-04-21 diff --git a/apps/api/src/app/admin/update-asset-profile.dto.ts b/apps/api/src/app/admin/update-asset-profile.dto.ts index 45923410..5056dccd 100644 --- a/apps/api/src/app/admin/update-asset-profile.dto.ts +++ b/apps/api/src/app/admin/update-asset-profile.dto.ts @@ -32,7 +32,7 @@ export class UpdateAssetProfileDto { @IsOptional() currency?: string; - @IsEnum(DataSource, { each: true }) + @IsEnum(DataSource) @IsOptional() dataSource?: DataSource; diff --git a/apps/api/src/app/order/create-order.dto.ts b/apps/api/src/app/order/create-order.dto.ts index f40e65ba..c2b10fd8 100644 --- a/apps/api/src/app/order/create-order.dto.ts +++ b/apps/api/src/app/order/create-order.dto.ts @@ -49,7 +49,7 @@ export class CreateOrderDto { @IsOptional() customCurrency?: string; - @IsEnum(DataSource, { each: true }) + @IsEnum(DataSource) @IsOptional() dataSource?: DataSource; diff --git a/apps/api/src/services/data-provider/data-provider.service.ts b/apps/api/src/services/data-provider/data-provider.service.ts index 3f02cf10..a4edd5bf 100644 --- a/apps/api/src/services/data-provider/data-provider.service.ts +++ b/apps/api/src/services/data-provider/data-provider.service.ts @@ -18,6 +18,7 @@ import { DATE_FORMAT, getCurrencyFromSymbol, getStartOfUtcDate, + isCurrency, isDerivedCurrency } from '@ghostfolio/common/helper'; import { @@ -468,17 +469,21 @@ export class DataProviderService { )) { const dataProvider = this.getDataProvider(DataSource[dataSource]); - if ( - dataProvider.getDataProviderInfo().isPremium && - this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION') && - user?.subscription.type === 'Basic' - ) { - continue; - } - const symbols = assetProfileIdentifiers .filter(({ symbol }) => { - return !isDerivedCurrency(getCurrencyFromSymbol(symbol)); + if (isCurrency(getCurrencyFromSymbol(symbol))) { + // Keep non-derived currencies + return !isDerivedCurrency(getCurrencyFromSymbol(symbol)); + } else if ( + dataProvider.getDataProviderInfo().isPremium && + this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION') && + user?.subscription.type === 'Basic' + ) { + // Skip symbols of Premium data providers for users without subscription + return false; + } + + return true; }) .map(({ symbol }) => { return symbol; diff --git a/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts b/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts index b57bcb0f..7ee9c66c 100644 --- a/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts +++ b/apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.component.ts @@ -1,5 +1,6 @@ import { XRayRulesSettings } from '@ghostfolio/common/interfaces'; +import { CommonModule } from '@angular/common'; import { Component, Inject } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; @@ -13,7 +14,13 @@ import { MatSliderModule } from '@angular/material/slider'; import { IRuleSettingsDialogParams } from './interfaces/interfaces'; @Component({ - imports: [FormsModule, MatButtonModule, MatDialogModule, MatSliderModule], + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatDialogModule, + MatSliderModule + ], selector: 'gf-rule-settings-dialog', styleUrls: ['./rule-settings-dialog.scss'], templateUrl: './rule-settings-dialog.html' diff --git a/apps/client/src/locales/messages.ca.xlf b/apps/client/src/locales/messages.ca.xlf index 41a5e907..456e1579 100644 --- a/apps/client/src/locales/messages.ca.xlf +++ b/apps/client/src/locales/messages.ca.xlf @@ -1003,7 +1003,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -1603,7 +1603,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -4639,7 +4639,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4739,7 +4739,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -6035,11 +6035,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6055,7 +6055,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6063,7 +6063,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6071,7 +6071,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.de.xlf b/apps/client/src/locales/messages.de.xlf index 1cc922c3..10f26cdd 100644 --- a/apps/client/src/locales/messages.de.xlf +++ b/apps/client/src/locales/messages.de.xlf @@ -1666,7 +1666,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2186,7 +2186,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -2314,7 +2314,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3358,7 +3358,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5963,11 +5963,11 @@ Keine Einträge vorhanden... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6183,7 +6183,7 @@ Zeitraum libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6383,7 +6383,7 @@ Filter zurücksetzen libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6407,7 +6407,7 @@ Filter anwenden libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7497,7 +7497,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.es.xlf b/apps/client/src/locales/messages.es.xlf index 555c95ac..8ba70472 100644 --- a/apps/client/src/locales/messages.es.xlf +++ b/apps/client/src/locales/messages.es.xlf @@ -1651,7 +1651,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2171,7 +2171,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -2299,7 +2299,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3343,7 +3343,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5940,11 +5940,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6160,7 +6160,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6360,7 +6360,7 @@ Reiniciar filtros libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6384,7 +6384,7 @@ Aplicar filtros libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7474,7 +7474,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.fr.xlf b/apps/client/src/locales/messages.fr.xlf index fa100739..78893b59 100644 --- a/apps/client/src/locales/messages.fr.xlf +++ b/apps/client/src/locales/messages.fr.xlf @@ -654,7 +654,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -1906,7 +1906,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2798,7 +2798,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -3342,7 +3342,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5939,11 +5939,11 @@ Pas d’entrées ... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Intervalle de Date libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Réinitialiser les Filtres libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Appliquer les Filtres libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Étiquette libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.it.xlf b/apps/client/src/locales/messages.it.xlf index 08153568..c8c1a086 100644 --- a/apps/client/src/locales/messages.it.xlf +++ b/apps/client/src/locales/messages.it.xlf @@ -1651,7 +1651,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2171,7 +2171,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -2299,7 +2299,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3343,7 +3343,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5940,11 +5940,11 @@ Nessun risultato... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6160,7 +6160,7 @@ Intervallo di date libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6360,7 +6360,7 @@ Reset Filtri libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6384,7 +6384,7 @@ Applica i Filtri libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7474,7 +7474,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.nl.xlf b/apps/client/src/locales/messages.nl.xlf index 6852f726..7c5066ad 100644 --- a/apps/client/src/locales/messages.nl.xlf +++ b/apps/client/src/locales/messages.nl.xlf @@ -1650,7 +1650,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2170,7 +2170,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -2298,7 +2298,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3342,7 +3342,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5939,11 +5939,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.pl.xlf b/apps/client/src/locales/messages.pl.xlf index e7c42b11..4970c3d5 100644 --- a/apps/client/src/locales/messages.pl.xlf +++ b/apps/client/src/locales/messages.pl.xlf @@ -1495,7 +1495,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -4251,7 +4251,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4351,7 +4351,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -4751,7 +4751,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -5499,11 +5499,11 @@ Brak wpisów... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Zakres Dat libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Resetuj Filtry libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Zastosuj Filtry libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.pt.xlf b/apps/client/src/locales/messages.pt.xlf index 414bacda..84a3a006 100644 --- a/apps/client/src/locales/messages.pt.xlf +++ b/apps/client/src/locales/messages.pt.xlf @@ -654,7 +654,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -1890,7 +1890,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -2694,7 +2694,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -3342,7 +3342,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -5939,11 +5939,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.tr.xlf b/apps/client/src/locales/messages.tr.xlf index 78a66fc9..97457c7a 100644 --- a/apps/client/src/locales/messages.tr.xlf +++ b/apps/client/src/locales/messages.tr.xlf @@ -1447,7 +1447,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3731,7 +3731,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -3831,7 +3831,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -4223,7 +4223,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -5939,11 +5939,11 @@ Girdi yok... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6159,7 +6159,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6359,7 +6359,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6383,7 +6383,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7473,7 +7473,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.uk.xlf b/apps/client/src/locales/messages.uk.xlf index 47fb7663..dae66111 100644 --- a/apps/client/src/locales/messages.uk.xlf +++ b/apps/client/src/locales/messages.uk.xlf @@ -1019,7 +1019,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -1495,7 +1495,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -4879,7 +4879,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4999,7 +4999,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -6681,11 +6681,11 @@ Немає записів... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6701,7 +6701,7 @@ Діапазон дат libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6709,7 +6709,7 @@ Тег libs/ui/src/lib/assistant/assistant.html - 155 + 157 @@ -6717,7 +6717,7 @@ Скинути фільтри libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6725,7 +6725,7 @@ Застосувати фільтри libs/ui/src/lib/assistant/assistant.html - 195 + 197 diff --git a/apps/client/src/locales/messages.xlf b/apps/client/src/locales/messages.xlf index ad4e1a3a..d8a7b552 100644 --- a/apps/client/src/locales/messages.xlf +++ b/apps/client/src/locales/messages.xlf @@ -1438,7 +1438,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -3937,7 +3937,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4026,7 +4026,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -4383,7 +4383,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -5084,11 +5084,11 @@ No entries... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -5616,7 +5616,7 @@ Date Range libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -5801,7 +5801,7 @@ Reset Filters libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -5829,7 +5829,7 @@ Apply Filters libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -6766,7 +6766,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/apps/client/src/locales/messages.zh.xlf b/apps/client/src/locales/messages.zh.xlf index 12ed4498..6305867a 100644 --- a/apps/client/src/locales/messages.zh.xlf +++ b/apps/client/src/locales/messages.zh.xlf @@ -1504,7 +1504,7 @@ libs/ui/src/lib/assistant/assistant.html - 166 + 168 @@ -4260,7 +4260,7 @@ libs/ui/src/lib/assistant/assistant.html - 107 + 109 @@ -4360,7 +4360,7 @@ libs/ui/src/lib/assistant/assistant.html - 127 + 129 @@ -4760,7 +4760,7 @@ libs/ui/src/lib/assistant/assistant.html - 46 + 44 @@ -5540,11 +5540,11 @@ 没有条目... libs/ui/src/lib/assistant/assistant.html - 63 + 62 libs/ui/src/lib/assistant/assistant.html - 84 + 85 @@ -6144,7 +6144,7 @@ 日期范围 libs/ui/src/lib/assistant/assistant.html - 93 + 95 @@ -6352,7 +6352,7 @@ 重置过滤器 libs/ui/src/lib/assistant/assistant.html - 185 + 187 @@ -6384,7 +6384,7 @@ 应用过滤器 libs/ui/src/lib/assistant/assistant.html - 195 + 197 @@ -7474,7 +7474,7 @@ Tag libs/ui/src/lib/assistant/assistant.html - 155 + 157 diff --git a/libs/ui/src/lib/assistant/assistant.html b/libs/ui/src/lib/assistant/assistant.html index 33b4db3f..fa673853 100644 --- a/libs/ui/src/lib/assistant/assistant.html +++ b/libs/ui/src/lib/assistant/assistant.html @@ -15,28 +15,26 @@ [formControl]="searchFormControl" [placeholder]="placeholder" /> -
- / -
- - + @if (deviceType !== 'mobile' && !searchFormControl.value) { +
/
+ } + @if (searchFormControl.value) { + + } @else { + + }
- -
No entries...
+ @if (isLoading) { + + } @else { +
No entries...
+ }
@@ -72,16 +72,18 @@ (clicked)="onCloseAssistant()" /> - -
No entries...
+ @if (isLoading) { + + } @else { +
No entries...
+ }
diff --git a/libs/ui/src/lib/value/value.component.html b/libs/ui/src/lib/value/value.component.html index 0ead7497..e252ef8a 100644 --- a/libs/ui/src/lib/value/value.component.html +++ b/libs/ui/src/lib/value/value.component.html @@ -13,42 +13,45 @@
+
-
-
- @if (value === null) { - *****% - } @else { - {{ formattedValue }}% - } -
-
- @if (value === null) { - ***** - } @else { - {{ formattedValue }} - } -
- - {{ unit }} - -
- {{ unit }} -
+ @if (isPercent) { +
+ @if (value === null) { + *****% + } @else { + {{ formattedValue }}% + } +
+ } @else { +
+ @if (value === null) { + ***** + } @else { + {{ formattedValue }} + } +
+ } + @if (unit) { + + {{ unit }} + +
+ {{ unit }} +
+ } - + @if (isString) {
+ @if (value === undefined) { + + }
diff --git a/package-lock.json b/package-lock.json index 51ddd7bc..a45d5d87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ghostfolio", - "version": "2.154.0", + "version": "2.155.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ghostfolio", - "version": "2.154.0", + "version": "2.155.0", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { diff --git a/package.json b/package.json index 4d861629..64fc87aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "2.154.0", + "version": "2.155.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "repository": "https://github.com/ghostfolio/ghostfolio", diff --git a/test/import/invalid-data-source.json b/test/import/invalid-data-source.json new file mode 100644 index 00000000..472e295e --- /dev/null +++ b/test/import/invalid-data-source.json @@ -0,0 +1,18 @@ +{ + "meta": { + "date": "2021-01-01T00:00:00.000Z", + "version": "dev" + }, + "activities": [ + { + "currency": "USD", + "dataSource": "", + "date": "2021-01-01T00:00:00.000Z", + "fee": 0, + "quantity": 20, + "symbol": "AAPL", + "type": "BUY", + "unitPrice": 100.0 + } + ] +}