Skip to content

Commit

Permalink
Merge pull request #1653 from ashswap/7k-aggregator-volume
Browse files Browse the repository at this point in the history
7k aggregator volume statistic
  • Loading branch information
dtmkeng committed Jul 10, 2024
2 parents 2c32fed + 2f367c5 commit befdb04
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions aggregators/7k-aggregator/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import fetchURL from '../../utils/fetchURL';
import { FetchV2, SimpleAdapter } from '../../adapters/types';
import { CHAIN } from '../../helpers/chains';

const URL = 'https://statistic.7k.ag';

const fetch: FetchV2 = async ({ fromTimestamp, toTimestamp }) => {
const dailyVolume = await fetchURL(
`${URL}/volume-with-ts?from_timestamp=${fromTimestamp}&to_timestamp=${toTimestamp}`,
);
return { dailyVolume };
};

const adapter: SimpleAdapter = {
version: 2,
adapter: {
[CHAIN.SUI]: {
fetch,
start: 1719563120,
},
},
};

export default adapter;

0 comments on commit befdb04

Please sign in to comment.