From ea41a7ecd1bc4925650839ecd47f0a0b19a36cfd Mon Sep 17 00:00:00 2001 From: melon <44160230+nmelentjevs@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:45:50 +0200 Subject: [PATCH] edit DexHunter adapter (#1997) --- aggregators/dexhunter/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aggregators/dexhunter/index.ts b/aggregators/dexhunter/index.ts index 154dba05a1..24cda533db 100644 --- a/aggregators/dexhunter/index.ts +++ b/aggregators/dexhunter/index.ts @@ -3,8 +3,8 @@ import { FetchResult, SimpleAdapter } from "../../adapters/types"; import { CHAIN } from "../../helpers/chains"; import { getUniqStartOfTodayTimestamp } from "../../helpers/getUniSubgraphVolume"; -const URL = 'https://dexhunter-staging-xoi27nkjlq-uc.a.run.app'; -const endpoint = '/openapi/stats'; +const URL = 'https://api-us.dexhunterv3.app'; +const endpoint = '/stats/fear_and_greed'; const startTimestamp = 1684108800; // 15.10.2023 interface IAPIResponse { @@ -21,7 +21,7 @@ const fetchData = async (period: '24h' | 'all'): Promise => { throw new Error('No dexhunter data found'); } - return dexhunterData.usd_volume.toString() + return (dexhunterData.usd_volume / 1000000).toString() } const fetch = async (): Promise => { @@ -30,8 +30,8 @@ const fetch = async (): Promise => { const dayTimestamp = getUniqStartOfTodayTimestamp(new Date()); return { - dailyVolume, - totalVolume, + dailyVolume: dailyVolume, + totalVolume: totalVolume, timestamp: dayTimestamp, }; }