From 6ab01a34ba5481072df75d120384e095b4f89b6f Mon Sep 17 00:00:00 2001 From: Tony Lee Date: Mon, 25 Nov 2024 13:42:06 -0500 Subject: [PATCH] indexer updates --- dexs/deepbookv3-sui/index.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dexs/deepbookv3-sui/index.ts b/dexs/deepbookv3-sui/index.ts index 04ac3b0798..e923c8b305 100644 --- a/dexs/deepbookv3-sui/index.ts +++ b/dexs/deepbookv3-sui/index.ts @@ -42,11 +42,9 @@ const fetchVolumeInUsd = ( const fetch: any = async (options: FetchOptions) => { const poolId = Object.values(pools).join(","); - // const dailyVolumeUrl = `https://deepbook-indexer.mainnet.mystenlabs.com/get_24hr_volume/${poolId}`; - - const startTime = options.startTimestamp * 1000; - const endTime = options.endTimestamp * 1000 - const historicalVolumeUrl = `https://deepbook-indexer.mainnet.mystenlabs.com/get_historical_volume/${poolId}/${startTime}/${endTime}`; + const startTime = options.startTimestamp; // times are in unix seconds + const endTime = options.endTimestamp; // times are in unix seconds + const historicalVolumeUrl = `https://deepbook-indexer.mainnet.mystenlabs.com/get_historical_volume/${poolId}?start_time=${startTime}&end_time=${endTime}`; const historicalVolumeResponse = await axios.get(historicalVolumeUrl); const historicalVolumeData = historicalVolumeResponse.data; const dailyVolume = options.createBalances()