Skip to content

Commit

Permalink
Merge pull request DefiLlama#1289 from UjjwalGupta49/master
Browse files Browse the repository at this point in the history
added total perps volume for flash.trade
  • Loading branch information
dtmkeng authored Mar 12, 2024
2 parents 998bf07 + 1c4f8a3 commit cd69e4d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dexs/flashtrade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { BreakdownAdapter, ProtocolType, FetchResultVolume } from "../../adapter
import { CHAIN } from "../../helpers/chains";
import fetchURL from "../../utils/fetchURL";

const marketsCombinedVolumeDaily = "https://api.prod.flash.trade/market-stat/volume-all-markets-24hr";
const marketsCombinedVolumeDaily = "https://api.prod.flash.trade/market-stats";

const fetchPerpVolume = async(
timestamp: number
):Promise<FetchResultVolume> => {
const dailyStats = (await fetchURL(marketsCombinedVolumeDaily));
const marketStats = (await fetchURL(marketsCombinedVolumeDaily));
return {
dailyVolume: dailyStats?.total_volume_in_usd.toString(),
dailyVolume: marketStats?.dailyVolumeInUsd.toString(),
totalVolume: marketStats?.totalVolumeInUsd.toString(),
timestamp: timestamp
}
}
Expand Down

0 comments on commit cd69e4d

Please sign in to comment.