Skip to content

Commit

Permalink
Merge pull request DefiLlama#1444 from BitGonzi/helix-markets-dex-das…
Browse files Browse the repository at this point in the history
…hboard

Add Helix Markets DEX dailyVolume
  • Loading branch information
dtmkeng authored Apr 25, 2024
2 parents c53d206 + d35daf8 commit f8562ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dexs/helix-markets/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@

import { FetchOptions, FetchResultV2, FetchV2, SimpleAdapter } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";
import { httpGet } from "../../utils/fetchURL";


const URL = "https://dgw.helixic.io/api/v1/ticker";
interface IVolume {
quoteVolume: string;
}


const fetch: FetchV2 = async (_: FetchOptions): Promise<FetchResultV2> => {
const quoteVolume: IVolume[] = (await httpGet(URL));
const dailyVolume = quoteVolume.reduce((e: number, a: IVolume) => parseFloat(a.quoteVolume) + e, 0);
return {
dailyVolume: `${dailyVolume}`,
dailyVolume: `${dailyVolume}`
}
}

Expand Down

0 comments on commit f8562ca

Please sign in to comment.