diff --git a/aggregator-derivatives/vooi/index.ts b/aggregator-derivatives/vooi/index.ts index e5f52f6649..796ec33ec2 100644 --- a/aggregator-derivatives/vooi/index.ts +++ b/aggregator-derivatives/vooi/index.ts @@ -20,16 +20,20 @@ const fetchArbitrum = async (timestamp: number, _t: any, options: FetchOptions): if (!synfuturesItem) { synfuturesItem = {dailyVolume: 0, totalVolume: 0} } - let kiloexItem = fetchData.find(((item) => item.protocol == "kiloex")) + let kiloexItem = fetchData.filter(((item) => item.protocol == "kiloex")) if (!kiloexItem) { kiloexItem = {dailyVolume: 0, totalVolume: 0} } - let dailyVolume = Number(orderlyItem.dailyVolume) + Number(kiloexItem.dailyVolume) - let totalVolume = Number(orderlyItem.totalVolume) + Number(kiloexItem.totalVolume) + let dailyVolume = Number(orderlyItem.dailyVolume) + let totalVolume = Number(orderlyItem.totalVolume) for (let i in synfuturesItem){ dailyVolume = Number(dailyVolume) + Number(synfuturesItem[i].dailyVolume) totalVolume = Number(totalVolume) + Number(synfuturesItem[i].totalVolume) } + for (let i in kiloexItem){ + dailyVolume = Number(dailyVolume) + Number(kiloexItem[i].dailyVolume) + totalVolume = Number(totalVolume) + Number(kiloexItem[i].totalVolume) + } return { dailyVolume, totalVolume,