Skip to content

Commit

Permalink
Merge pull request #1707 from NicholasMaselli/master
Browse files Browse the repository at this point in the history
Adding Saturn Swap Volume to DefiLlama
  • Loading branch information
dtmkeng committed Aug 6, 2024
2 parents 99e5b39 + e4430af commit f7556f5
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions dexs/saturnswap/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import fetchURL from "../../utils/fetchURL";
import { CHAIN } from "../../helpers/chains";
import { FetchResultVolume, SimpleAdapter } from "../../adapters/types";

const fetch = async (timestamp: any): Promise<FetchResultVolume> => {
const startOfDay = timestamp.startOfDay;
const response: any = await fetchURL(
`https://api.saturnswap.io/v1/defillama/volume?timestamp=${startOfDay}`
);
const dailyVolume = response.volume.volume;
return {
dailyVolume: `${dailyVolume}`,
timestamp: startOfDay,
};
};

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

export default adapter;

0 comments on commit f7556f5

Please sign in to comment.