Skip to content

Commit

Permalink
track titan #2113
Browse files Browse the repository at this point in the history
  • Loading branch information
g1nt0ki committed Nov 21, 2024
1 parent 1eae010 commit 787edda
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions aggregators/titan/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Adapter, FetchV2 } from "../../adapters/types";
import { httpGet } from "../../utils/fetchURL";
import { CHAIN } from "../../helpers/chains";

const statisticsEndpoint = "https://api.titan.tg/v1/statistics"

const fetch: FetchV2 = async ({ fromTimestamp, toTimestamp }) => {
const statistics = await httpGet(statisticsEndpoint, {
params: {
start: fromTimestamp,
end: toTimestamp,
}
})

return {
dailyVolume: statistics?.volumeUsd,
};
}

const adapter: Adapter = {
version: 2,
adapter: {
[CHAIN.TON]: {
fetch,
start: 1730250000,
},
}
}

export default adapter;

0 comments on commit 787edda

Please sign in to comment.