Skip to content

Commit

Permalink
Perpetuals - fix 24h volume (#2342)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiltom authored Jul 17, 2022
1 parent cba6c8c commit bad80d4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ export const usePerpetual_ContractDetails = (pairType: PerpetualPairType) => {
pair.id,
Math.ceil(timestampYesterday / 1000),
24,
true,
false,
);

if (data) {
let total = 0;
for (let i = 0; i < data.length; i++) {
// make sure to only use candles that are within the last
if (data[i] && data[i].time > timestampYesterday) {
if (data[i] && data[i].time >= timestampYesterday) {
total += data[i].volume || 0;
}
}
Expand Down

0 comments on commit bad80d4

Please sign in to comment.