Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions dexs/woofi-perps/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { FetchResultFees, FetchResultVolume, SimpleAdapter } from "../../adapters/types";
import fetchURL from "../../utils/fetchURL";

const fetch = async (timestamp: number): Promise<FetchResultVolume & FetchResultFees> => {
const perpsVolume = await fetchURL('https://api.woofi.com/woofi_pro/perps_volume');

const rowsLength = perpsVolume?.data?.rows?.length;
const result = perpsVolume?.data?.rows?.[rowsLength - 1];

return {
dailyVolume: result?.["perp_volume"],
};
};

const adapter: SimpleAdapter = {
adapter: {
base: {
fetch,
runAtCurrTime: true,
start: '2025-06-01',
},
},
};

export default adapter;
Loading