* feat(lib): move ConfirmationDialogType to common lib
* fix(lib): move SubscriptionType to enums
* feat(lib): move validateObjectForForm util to common lib
* feat(lib): move GfDialogFooterComponent to ui lib
* feat(lib): move GfDialogHeaderComponent to ui lib
* feat(lib): move SymbolPipe to common lib
* feat(lib): move CreateAccountBalanceDto to common lib
* feat(lib): move IsCurrencyCode validator to common lib
* feat(lib): move UpdateAssetProfileDto to common lib
* feat(lib): move UpdateUserSettingDto to common lib
* feat(lib): move CreateAccessDto to common lib
* feat(lib): move UpdateAccessDto to common lib
* feat(lib): move CreateTagDto to common lib
* feat(lib): move UpdateTagDto to common lib
* feat(lib): move CreatePlatformDto to common lib
* feat(lib): move UpdatePlatformDto to common lib
* feat(lib): move CreateOrderDto to common lib
* feat(lib): move UpdateOrderDto to common lib
* feat(lib): move RuleSettings interface to common lib
* feat(lib): move CreateAccountDto TransferBalanceDto UpdateAccountDto to common lib
* feat(lib): move CreateAccountWithBalancesDto to common lib
* feat(lib): move CreateAssetProfileDto and CreateAssetProfileWithMarketDataDto to common lib
* feat(lib): move AuthDeviceDto to common lib
* feat(lib): move simplewebauthn interfaces to common lib
This includes AssertionCredentialJSON, AttestationCredentialJSON, PublicKeyCredentialCreationOptionsJSON, PublicKeyCredentialRequestOptionsJSON.
* feat(lib): move UpdateMarketDataDto to common lib
* feat(lib): move UpdateBulkMarketDataDto to common lib
* feat(lib): move CreateWatchlistItemDto to common lib
* feat(lib): move DeleteOwnUserDto to common lib
* feat(lib): move UserItem interface to common lib
* feat(lib): move UpdateOwnAccessTokenDto to common lib
* feat(lib): move PropertyDto to common lib
**Justification**
My main portfolio is on MOEX, so I need a way to manage it. Ghostfolio looks
cool but there's no way to proper manage assets on MOEX. So, first I've found
`moex-iss-api` npm package. Turns out it needed some help, so couple of PR
there. After that I was ready to work on ghostfolio.
This commit implements full `DataProviderInterface` spec:
- Disabled by default, so only those who need it would enabled it.
- We `canHandle` all symbols
- We aren't premium feature
- `getQuotes`, `getHistorical` and `search` were pretty straightforward
- `getTestSymbol` return `SBER` because if something happens to `SBER` stocks
then MOEX would definetely doesn't matter anymore for sometime.
- `getAssetProfile` and `getDividends` proved to be tricky to implement, so
I'll cover them below separately.
**getAssetProfile**
**Currency**
This is main method to get info about assets. Unfortunately, due to fall of
USSR and ruble denomination in 1998, we have three currency tickers: 'RUR',
'SUR', 'RUB' For convenience we use 'RUB' instead of all of them. I don't see
practical value to differentiate between them here, but I'm open to suggestions.
Also, some of the tickers do not return currency in which they're listed on
MOEX. Assumed that it's also 'RUB'.
**Name**
Every asset can have several things to identify it. And all of them are
optional in MOEX API, except `secid` which is `Security ID`. So we use them
for name in this order of preference:
1. Latin (usually English) name.
2. Latin short name.
3. Russian name.
4. Security ID.
**Country**
I try to detect country, parsing ISIN: first two letters should be country code.
**Sectors**
MOEX supports some industry related indices, so when we first encounter some
symbol, I check whether it's in those indices and assign sectors accordingly.
**AssetClass and AssetSubClass**
At first, I was tempted to leave them empty, but finally decided to look into.
I downloaded all asset types from MOEX and tried to best of my knowledge assign
asset classes and subclasses. If I wasn't able to find proper relation, I left
the cell empty. After that I took the table (you can check it in the comments
in the code) and made `SecurityTypeMap` interface.
**getDividends**
MOEX API for dividends isn't documented at all (or probably I didn't find
proper docs) and sometimes it doesn't return the newest dividends. Surprisingly,
you can get dividends for MOEX-related assets from YAHOO, but the date can
differ. So, there is heurestic implemented: if those date are no more than two
days apart and payout is the same, then it's the exact same payout and we
merge them.
Signed-off-by: Anatoly Popov <me@aensidhe.ru>