Skip to content

Commit

Permalink
Merge pull request #2129 from leecchh/tlee/dbv3-indexer-updates
Browse files Browse the repository at this point in the history
Deepbook V3 indexer endpoint updates
  • Loading branch information
dtmkeng authored Nov 26, 2024
2 parents 730acbe + 6ab01a3 commit a8f2720
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dexs/deepbookv3-sui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a8f2720

Please sign in to comment.