diff --git a/crates/bin/pindexer/src/dex_ex/mod.rs b/crates/bin/pindexer/src/dex_ex/mod.rs index 5b9b736d0a..d430ef7150 100644 --- a/crates/bin/pindexer/src/dex_ex/mod.rs +++ b/crates/bin/pindexer/src/dex_ex/mod.rs @@ -443,7 +443,9 @@ mod summary { SELECT COALESCE(SUM(direct_volume), 0.0) AS direct_volume_over_window, COALESCE(SUM(swap_volume), 0.0) AS swap_volume_over_window, - COALESCE(SUM(trades), 0.0) AS trades_over_window + COALESCE(SUM(trades), 0.0) AS trades_over_window, + COALESCE(MIN(price), 0.0) AS low, + COALESCE(MAX(price), 0.0) AS high FROM snapshots WHERE time <= $3 AND time >= $4 @@ -452,6 +454,7 @@ mod summary { SELECT $1, $2, $5, price, price_then, + low, high, liquidity, liquidity_then, direct_volume_over_window, swap_volume_over_window, diff --git a/crates/bin/pindexer/src/dex_ex/schema.sql b/crates/bin/pindexer/src/dex_ex/schema.sql index 1e89821f3e..6de17b2be2 100644 --- a/crates/bin/pindexer/src/dex_ex/schema.sql +++ b/crates/bin/pindexer/src/dex_ex/schema.sql @@ -49,6 +49,8 @@ CREATE TABLE IF NOT EXISTS dex_ex_pairs_summary ( the_window TEXT NOT NULL, price FLOAT8 NOT NULL, price_then FLOAT8 NOT NULL, + low FLOAT8 NOT NULL, + high FLOAT8 NOT NULL, liquidity FLOAT8 NOT NULL, liquidity_then FLOAT8 NOT NULL, direct_volume_over_window FLOAT8 NOT NULL,