Mark outcome positions and report account holdings value

This commit is contained in:
2026-12-03 05:27:22 +08:00
parent fae9f26829
commit 02f0c224e0
11 changed files with 238 additions and 39 deletions
+8
View File
@@ -53,6 +53,13 @@ impl Exchange {
if !quotes_ready {
db.execute_batch(include_str!("quote_schema.sql"))?;
}
let marks_ready: bool = db.query_row(
"SELECT EXISTS(SELECT 1 FROM sqlite_schema WHERE type='table' AND name='last_asset_trades')",
[], |row| row.get(0),
)?;
if !marks_ready {
db.execute_batch(include_str!("valuation_schema.sql"))?;
}
let tx = expiry::transaction(&db, TransactionBehavior::Deferred)?;
let books = Books::recover(&tx)?;
tx.commit()?;
@@ -75,6 +82,7 @@ impl Exchange {
| "book"
| "open_orders"
| "positions"
| "portfolio_value"
| "trades"
| "activity"
| "resolution"