Skip to content

Commit

Permalink
kongswap volume (#2239)
Browse files Browse the repository at this point in the history
* kongswap volume

* Update index.ts

---------

Co-authored-by: g1nt0ki <[email protected]>
  • Loading branch information
prim8bits and g1nt0ki authored Dec 19, 2024
1 parent f9c4ae5 commit 5a1fd7e
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions dexs/kongswap/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { Adapter, FetchResultVolume } from "../../adapters/types"
import { CHAIN } from "../../helpers/chains";
import fetchURL from "../../utils/fetchURL";

const fetch = async (timestamp: number): Promise<FetchResultVolume> => {
const response = await fetchURL('https://api.kongswap.io/api/defillama/total_volume');
return {
dailyVolume: response['24h_volume'],
timestamp
}
};

const adapter: Adapter = {
adapter: {
[CHAIN.ICP]: {
fetch: fetch,
runAtCurrTime: true,
start: '2024-11-01',
},
}
}

export default adapter;

0 comments on commit 5a1fd7e

Please sign in to comment.