Serve condition-scoped portfolio valuations from marked holdings

This commit is contained in:
2026-12-03 12:31:58 +08:00
parent 5696e3dae2
commit e26ba27a24
13 changed files with 302 additions and 16 deletions
+1
View File
@@ -1,6 +1,7 @@
CREATE TABLE IF NOT EXISTS accounts (
id TEXT PRIMARY KEY, cash INTEGER NOT NULL CHECK(cash >= 0)
);
CREATE INDEX IF NOT EXISTS accounts_by_wallet ON accounts(id COLLATE NOCASE);
CREATE TABLE IF NOT EXISTS markets (
id TEXT PRIMARY KEY, rules TEXT NOT NULL, phase TEXT NOT NULL,
collateral INTEGER NOT NULL DEFAULT 0 CHECK(collateral >= 0), winner TEXT