Serve a public market and event trade feed with taker-side pricing
This commit is contained in:
@@ -95,6 +95,8 @@ CREATE TABLE IF NOT EXISTS paired_fills (
|
||||
quantity INTEGER NOT NULL CHECK(quantity>0),
|
||||
at_ms INTEGER NOT NULL DEFAULT (CAST(unixepoch('subsec')*1000 AS INTEGER))
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS public_direct_time ON trade_prices(at_ms,fill);
|
||||
CREATE INDEX IF NOT EXISTS public_paired_time ON paired_fills(at_ms,seq);
|
||||
CREATE INDEX IF NOT EXISTS paired_history ON paired_fills(market,at_ms,seq);
|
||||
CREATE VIEW IF NOT EXISTS next_execution AS
|
||||
SELECT 1+MAX(COALESCE((SELECT MAX(seq) FROM fills),0),
|
||||
|
||||
Reference in New Issue
Block a user