Expose paginated account orders and terminal order lookup

This commit is contained in:
2026-12-03 03:56:10 +08:00
parent 646cf193bb
commit 4a9b696644
7 changed files with 159 additions and 2 deletions
+1
View File
@@ -15,6 +15,7 @@ CREATE TABLE IF NOT EXISTS orders (
remaining INTEGER NOT NULL CHECK(remaining >= 0), status TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS active_book ON orders(market,outcome,seq) WHERE status='live';
CREATE INDEX IF NOT EXISTS account_open_orders ON orders(account,seq) WHERE status='live';
CREATE TABLE IF NOT EXISTS fills (
seq INTEGER PRIMARY KEY, bid INTEGER REFERENCES orders, ask INTEGER REFERENCES orders,
price INTEGER NOT NULL, quantity INTEGER NOT NULL