Browse Source
Feature/restructure import test files (#4977)
* Restructure import test files
pull/5044/head
Thomas Kaul
4 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
29 changed files with
6 additions and
6 deletions
-
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btceur.spec.ts
-
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-btcusd.spec.ts
-
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell-partially.spec.ts
-
apps/api/src/app/portfolio/calculator/roai/portfolio-calculator-novn-buy-and-sell.spec.ts
-
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html
-
test/import/not-ok/invalid-currency.csv
-
test/import/not-ok/invalid-data-source.json
-
test/import/not-ok/invalid-date-before-min.json
-
test/import/not-ok/invalid-date-yy.csv
-
test/import/not-ok/invalid-date.json
-
test/import/not-ok/invalid-fee.csv
-
test/import/not-ok/invalid-multi-line.csv
-
test/import/not-ok/invalid-symbol-btc-usd.csv
-
test/import/not-ok/invalid-symbol.csv
-
test/import/not-ok/invalid-symbol.json
-
test/import/not-ok/unavailable-exchange-rate.json
-
test/import/not-ok/unexpected-format.json
-
test/import/ok/500-activities.json
-
test/import/ok/btceur.json
-
test/import/ok/btcusd.csv
-
test/import/ok/btcusd.json
-
test/import/ok/derived-currency.json
-
test/import/ok/novn-buy-and-sell-partially.json
-
test/import/ok/novn-buy-and-sell.json
-
test/import/ok/sample.csv
-
test/import/ok/sample.json
-
test/import/ok/vti-buy-long-history.json
-
test/import/ok/vti-buy-on-ibkr.csv
-
test/import/ok/without-accounts.json
|
|
@ -63,7 +63,7 @@ describe('PortfolioCalculator', () => { |
|
|
|
|
|
|
|
beforeAll(() => { |
|
|
|
activityDtos = loadActivityExportFile( |
|
|
|
join(__dirname, '../../../../../../../test/import/ok-btceur.json') |
|
|
|
join(__dirname, '../../../../../../../test/import/ok/btceur.json') |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
@ -63,7 +63,7 @@ describe('PortfolioCalculator', () => { |
|
|
|
|
|
|
|
beforeAll(() => { |
|
|
|
activityDtos = loadActivityExportFile( |
|
|
|
join(__dirname, '../../../../../../../test/import/ok-btcusd.json') |
|
|
|
join(__dirname, '../../../../../../../test/import/ok/btcusd.json') |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
@ -65,7 +65,7 @@ describe('PortfolioCalculator', () => { |
|
|
|
activityDtos = loadActivityExportFile( |
|
|
|
join( |
|
|
|
__dirname, |
|
|
|
'../../../../../../../test/import/ok-novn-buy-and-sell-partially.json' |
|
|
|
'../../../../../../../test/import/ok/novn-buy-and-sell-partially.json' |
|
|
|
) |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
@ -65,7 +65,7 @@ describe('PortfolioCalculator', () => { |
|
|
|
activityDtos = loadActivityExportFile( |
|
|
|
join( |
|
|
|
__dirname, |
|
|
|
'../../../../../../../test/import/ok-novn-buy-and-sell.json' |
|
|
|
'../../../../../../../test/import/ok/novn-buy-and-sell.json' |
|
|
|
) |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
@ -90,13 +90,13 @@ |
|
|
|
>The following file formats are supported:</span |
|
|
|
> |
|
|
|
<a |
|
|
|
href="https://github.com/ghostfolio/ghostfolio/blob/main/test/import/ok.csv" |
|
|
|
href="https://github.com/ghostfolio/ghostfolio/blob/main/test/import/ok/sample.csv" |
|
|
|
target="_blank" |
|
|
|
>CSV</a |
|
|
|
> |
|
|
|
<span class="mx-1" i18n>or</span> |
|
|
|
<a |
|
|
|
href="https://github.com/ghostfolio/ghostfolio/blob/main/test/import/ok.json" |
|
|
|
href="https://github.com/ghostfolio/ghostfolio/blob/main/test/import/ok/sample.json" |
|
|
|
target="_blank" |
|
|
|
>JSON</a |
|
|
|
> |
|
|
|
1 |
Date |
Code |
Currency |
Price |
Quantity |
Action |
Fee |
2 |
12/12/2021 |
BTCUSD |
<invalid> |
44558.42 |
1 |
buy |
0 |
|
1 |
Date |
Code |
Currency |
Price |
Quantity |
Action |
Fee |
2 |
16/09/21 |
MSFT |
USD |
298.580 |
5 |
buy |
19.00 |
|
1 |
Date |
Code |
CCY |
Price |
Qty |
Action |
Amount |
Fee |
2 |
16/09/2021 |
MSFT |
USD |
298.580 |
5 |
buy |
1496.09 |
<invalid> |
|
1 |
Date |
Code |
Currency |
Price |
Quantity |
Action |
Fee |
Note |
2 |
16-09-2021 |
MSFT |
USD |
298.580 |
5 |
buy |
19.00 |
My first order 🤓 |
3 |
17/11/2021 |
MSFT |
USD |
0.62 |
5 |
dividend |
0.00 |
|
4 |
01.01.2022 |
Penthouse Apartment |
USD |
500000.0 |
1 |
<invalid> |
0.00 |
|
5 |
20500606 |
MSFT |
USD |
0.00 |
0 |
buy |
0.00 |
|
|
1 |
Date |
Code |
Currency |
Price |
Quantity |
Action |
Fee |
2 |
12/12/2021 |
BTC-USD |
USD |
44558.42 |
1 |
buy |
0 |
|
1 |
Date |
Code |
CCY |
Price |
Qty |
Action |
Fee |
2 |
01/01/2021 |
<invalid> |
USD |
100.0 |
20 |
buy |
0 |
|
1 |
Date |
Code |
Currency |
Price |
Quantity |
Action |
Fee |
2 |
12/12/2021 |
BTCUSD |
USD |
44558.42 |
1 |
buy |
0 |
|
1 |
Date |
Code |
DataSource |
Currency |
Price |
Quantity |
Action |
Fee |
Note |
2 |
01-09-2021 |
Account Opening Fee |
MANUAL |
USD |
0 |
0 |
fee |
49 |
|
3 |
16-09-2021 |
MSFT |
YAHOO |
USD |
298.580 |
5 |
buy |
19.00 |
My first order 🤓 |
4 |
17/11/2021 |
MSFT |
YAHOO |
USD |
0.62 |
5 |
dividend |
0.00 |
|
5 |
01.01.2022 |
Penthouse Apartment |
MANUAL |
USD |
500000.0 |
1 |
item |
0.00 |
|
6 |
20500606 |
US5949181045 |
YAHOO |
USD |
0.00 |
0 |
buy |
0.00 |
|
|
1 |
CurrencyPrimary |
Symbol |
DateTime |
TradeDate |
TransactionType |
Quantity |
TradePrice |
Buy/Sell |
ClientAccountID |
AccountAlias |
Model |
FXRateToBase |
AssetClass |
SubCategory |
Description |
Conid |
SecurityID |
SecurityIDType |
CUSIP |
ISIN |
ListingExchange |
UnderlyingConid |
UnderlyingSymbol |
UnderlyingSecurityID |
UnderlyingListingExchange |
Issuer |
Multiplier |
Strike |
TradeID |
Expiry |
RelatedTradeID |
Put/Call |
ReportDate |
PrincipalAdjustFactor |
SettleDateTarget |
Exchange |
TradeMoney |
Proceeds |
Taxes |
IBCommission |
IBCommissionCurrency |
NetCash |
ClosePrice |
Open/CloseIndicator |
Notes/Codes |
CostBasis |
FifoPnlRealized |
FxPnl |
MtmPnl |
OrigTradePrice |
OrigTradeDate |
OrigTradeID |
OrigOrderID |
OrigTransactionID |
ClearingFirmID |
IBOrderID |
TransactionID |
IBExecID |
RelatedTransactionID |
BrokerageOrderID |
OrderReference |
VolatilityOrderLink |
ExchOrderID |
ExtExecID |
OrderTime |
OpenDateTime |
HoldingPeriodDateTime |
WhenRealized |
WhenReopened |
LevelOfDetail |
ChangeInPrice |
ChangeInQuantity |
OrderType |
TraderID |
IsAPIOrder |
AccruedInterest |
SerialNumber |
DeliveryType |
CommodityType |
Fineness |
Weight |
2 |
USD |
VTI |
20230403;095853 |
20230403 |
ExchTrade |
17 |
204.3473 |
BUY |
U1234567 |
|
|
0.9127 |
STK |
ETF |
VANGUARD TOTAL STOCK MKT ETF |
12340041 |
US9229087690 |
ISIN |
922908769 |
US9229087690 |
ARCA |
|
|
|
|
|
1 |
|
1234567890 |
|
|
|
20230403 |
|
20230405 |
DARK |
3473.9041 |
-3473.9041 |
0 |
-1 |
USD |
-3474.9041 |
204.64 |
O |
|
3474.9041 |
0 |
0 |
4.9759 |
0 |
|
|
0 |
0 |
|
1234567890 |
1234567890 |
0000a123.123abcde.01.01 |
|
00cb7412.0001b9c2.642a55d0.0001 |
|
|
N/A |
2304030003120950675 |
20230403;095853 |
|
|
|
|
EXECUTION |
0 |
0 |
LMT |
|
N |
0 |
|
|
|
0.0 |
0.0 () |
|