diff --git a/fees/prophet-protocol/index.ts b/fees/prophet-protocol/index.ts new file mode 100644 index 0000000000..dab195c45d --- /dev/null +++ b/fees/prophet-protocol/index.ts @@ -0,0 +1,29 @@ +import { FetchOptions, SimpleAdapter } from "../../adapters/types"; +import { CHAIN } from "../../helpers/chains"; +import fetchURL from "../../utils/fetchURL"; + +const adapter: SimpleAdapter = { + adapter: { + [CHAIN.TON]: { + fetch: async (timestamp: number, _t: any, options: FetchOptions) => { + const result = await fetchURL( + `https://api.prophet.click/history?timestamp=${options.startOfDay * 1000}` + ); + + return { + dailyUserFees: result.fees.toString(), + dailyFees: result.fees.toString(), + timestamp: result.timestamp, + }; + }, + start: 1719847914, + meta: { + methodology: { + Fees: "Traders pay opening fees", + }, + }, + }, + }, +}; + +export default adapter; diff --git a/options/prophet-protocol/index.ts b/options/prophet-protocol/index.ts new file mode 100644 index 0000000000..30fd37d0fb --- /dev/null +++ b/options/prophet-protocol/index.ts @@ -0,0 +1,28 @@ +import { FetchOptions, SimpleAdapter } from "../../adapters/types"; +import { CHAIN } from "../../helpers/chains"; +import fetchURL from "../../utils/fetchURL"; + +const adapter: SimpleAdapter = { + adapter: { + [CHAIN.TON]: { + fetch: async (timestamp: number, _t: any, options: FetchOptions) => { + const result = await fetchURL( + `https://api.prophet.click/history?timestamp=${options.startOfDay * 1000}` + ); + + return { + ...result, + timestamp, + }; + }, + start: 1719847914, + meta: { + methodology: { + Volume: "Parimutual bets volume", + }, + }, + }, + }, +}; + +export default adapter;