Skip to content

Commit

Permalink
Update api endpoint for StormTrade (#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
shuva10v authored Oct 17, 2024
1 parent 5b106c0 commit 85211b7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fees/stormtrade/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ export default {
meta: {
methodology: {
Fees: 'Traders pay opening and closing fees',
DataSource: 'Data collected by the re:doubt team, available at https://beta.redoubt.online/tracker'
DataSource: 'Data prepared by the project team by indexing blockchain data'
},
},
fetch: async () => {
const response = await fetchURL('https://api.redoubt.online/dapps/v1/export/defi/storm')
const response = await fetchURL('https://api5.storm.tg/api/markets/stats')

if (!response) {
throw new Error('Error during re:doubt API call')
throw new Error('Error during API call')
}

return {
dailyUserFees: response.fees.toString(),
dailyFees: response.fees.toString(),
timestamp: response.timestamp
dailyUserFees: parseInt(response.exchangedDailyFees) / 1e9,
dailyFees: parseInt(response.exchangedDailyFees) / 1e9,
timestamp: new Date().getTime() / 1000
}
},
},
Expand Down

0 comments on commit 85211b7

Please sign in to comment.