File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { Adapter , FetchOptions } from "../adapters/types" ;
2
+ import fetchURL from "../utils/fetchURL" ;
3
+
4
+ type TEndpoint = {
5
+ [ s : string ] : string ;
6
+ } ;
7
+
8
+ const endpoints : TEndpoint = {
9
+ [ "massa" ] : "https://mainnet.api.eaglefi.io/statistics/volume" ,
10
+ } ;
11
+
12
+ const fetch = async ( options : FetchOptions ) => {
13
+ const volume24H = await fetchURL (
14
+ `${ endpoints [ "massa" ] } ?start=${ options . startTimestamp } &end=${ options . endTimestamp } `
15
+ ) ;
16
+
17
+ return {
18
+ dailyVolume : volume24H . volume ,
19
+ dailyFees : volume24H . fees ,
20
+ } ;
21
+ } ;
22
+
23
+ const adapter : Adapter = {
24
+ version : 2 ,
25
+ adapter : {
26
+ massa : {
27
+ fetch,
28
+ start : "2025-06-23" ,
29
+ meta : {
30
+ methodology : {
31
+ Volume : 'Trading volume get from EagleFi API.' ,
32
+ Fees : 'Trading fees get from EagleFi API.' ,
33
+ } ,
34
+ } ,
35
+ } ,
36
+ } ,
37
+ } ;
38
+
39
+ export default adapter ;
Original file line number Diff line number Diff line change
1
+ import adapter from '../dexs/eaglefi' ;
2
+
3
+ export default adapter ;
You can’t perform that action at this time.
0 commit comments