mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-09-16 10:21:56 +00:00
feat(portfolio): nest asset positions
This commit is contained in:
@@ -101,12 +101,14 @@ Successful GIF replies include the result behind Telegram spoiler formatting.
|
||||
> counts and creates indexes on startup. Deleted legacy command rows are
|
||||
> retained with `deleted: true`; `/stats` queries filter those rows from visible
|
||||
> results. A historical `system` collection may remain in MongoDB with completed
|
||||
> migration records. Stock and coin documents store `costBasis` by symbol. On
|
||||
> every startup, enabled paper-trading modules verify that each positive holding
|
||||
> has a valid basis; legacy holdings are initialized from current quotes before
|
||||
> Telegram handlers are installed. The bot intentionally fails startup if a
|
||||
> required quote or migration write fails. Completed records remain in `system`
|
||||
> as audit history, but do not suppress later invariant scans.
|
||||
> migration records. Stock stores cash as `vnd`; coin stores cash as `usd`.
|
||||
> Both embed positions as
|
||||
> `assets.<symbol>.{quantity,base,dividendCheckedAt}`. On every startup, enabled
|
||||
> paper-trading modules verify this shape and migrate the previous flat
|
||||
> `assets`/`costBasis` documents before Telegram handlers are installed. The bot
|
||||
> intentionally fails startup if validation or a migration write fails.
|
||||
> Completed records remain in `system` as audit history, but do not suppress
|
||||
> later invariant scans.
|
||||
|
||||
## 2. Coolify
|
||||
|
||||
|
||||
Reference in New Issue
Block a user