Skip to content

Commit

Permalink
Merge pull request #1951 from idexio/master
Browse files Browse the repository at this point in the history
feat: add idex v4
  • Loading branch information
dtmkeng authored Oct 4, 2024
2 parents 2c6fef0 + 626f175 commit 9c5c157
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions dexs/idex-v4/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { SimpleAdapter } from "../../adapters/types";
import { httpGet } from "../../utils/fetchURL";

const URL = "https://api.idex.io/v4/exchange";

const fetch = async () => {
const response = await httpGet(URL);
const { totalVolume, volume24h } = response;

return {
totalVolume: totalVolume?.toString(),
dailyVolume: volume24h?.toString(),
};
};

const adapter: SimpleAdapter = {
adapter: {
idex: {
fetch,
start: 1721312070,
runAtCurrTime: true,
},
},
};

export default adapter;

0 comments on commit 9c5c157

Please sign in to comment.