Skip to content

Commit

Permalink
fix fees
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Jul 10, 2024
1 parent 0bb1cb1 commit 2c32fed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fees/surfone/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const headers = {
};

interface IVolume {
'24h_vol': number,
total_fee: number,
}

Expand All @@ -20,7 +21,9 @@ const fetch = () => {
const response = (await httpGet(volumeEndpointV2, { headers }));

const volume: IVolume = response.data;
const dailyFees = Number(volume['24h_vol'] || 0) * (0.1/100); // 0.1% of trade volume
return {
dailyFees: `${dailyFees}`,
totalFees: `${volume?.total_fee || undefined}`,
timestamp: dayTimestamp,
};
Expand Down

0 comments on commit 2c32fed

Please sign in to comment.