Skip to content

Commit

Permalink
pindexer(dex_ex): note about volume tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
erwanor committed Jan 11, 2025
1 parent 8749b95 commit d7e5319
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/bin/pindexer/src/dex_ex/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ mod candle {

impl Candle {
pub fn from_candlestick_data(data: &CandlestickData) -> Self {
// We want the direct volume in the other direction, and we consistently
// use the closing price as a conversion for that.
// The volume is tracked in terms of input asset.
// We can use the closing price (aka. the common clearing price) to convert
// the volume to the other direction i.e, the batch swap output.
Self {
open: data.open,
close: data.close,
Expand Down

0 comments on commit d7e5319

Please sign in to comment.