Skip to content

Commit 2f41f7c

Browse files
noatedengephaest
andauthored
Rhox pr (#4513)
* Add Rho X volume adapter * use version 1 --------- Co-authored-by: Valentin Tsybin <[email protected]>
1 parent 3cc575f commit 2f41f7c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

dexs/rho-x/index.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { FetchOptions, SimpleAdapter } from "../../adapters/types";
2+
import { CHAIN } from "../../helpers/chains";
3+
import fetchURL from "../../utils/fetchURL";
4+
5+
const fetch = async (_a: any, _b: any, options: FetchOptions) => {
6+
const startTime = new Date(options.fromTimestamp * 1000).toISOString();
7+
const endTime = new Date(options.toTimestamp * 1000).toISOString();
8+
const url = `https://x.rho.trading/api/v1/stats/volume?startTime=${startTime}&endTime=${endTime}`
9+
const dailyVolume = await fetchURL(url);
10+
11+
return { dailyVolume };
12+
};
13+
14+
const adapter: SimpleAdapter = {
15+
fetch,
16+
chains: [CHAIN.ETHEREUM],
17+
start: "2025-09-22",
18+
};
19+
20+
export default adapter;

0 commit comments

Comments
 (0)