Files
DefiLlama-Adapters/projects/valuedefi.js
2021-08-18 06:45:32 +00:00

29 lines
777 B
JavaScript

const utils = require('./helper/utils');
async function fetch() {
let response = await utils.fetchURL('https://api-stats.valuedefi.io/api/common-stat/get-total-locked')
return response.data.data.total
}
async function eth() {
let response = await utils.fetchURL('https://api-stats.valuedefi.io/api/common-stat/get-total-locked')
return response.data.data.ethTotal
}
async function bsc() {
let response = await utils.fetchURL('https://api-stats.valuedefi.io/api/common-stat/get-total-locked')
return response.data.data.bscTotal
}
module.exports = {
ethereum:{
fetch: eth,
},
bsc: {
fetch: bsc
},
fetch,
methodology: `TVL for ValueDefi is obtained from the ValueDefi API:'https://api-stats.valuedefi.io/api/common-stat/get-total-locked'.`
};