Skip to content

Commit d8551a6

Browse files
committed
Add ExinPool in Mixin Network
1 parent 7560775 commit d8551a6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

projects/exinpool/index.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const retry = require('async-retry');
2+
const axios = require("axios");
3+
const BigNumber = require("bignumber.js");
4+
5+
const APIs = {
6+
exinpool: 'https://mixin.exinpool.com/api/v1/node/status',
7+
}
8+
9+
async function fetch() {
10+
const resp = await retry(async bail => await axios.get(APIs.exinpool))
11+
let result = new BigNumber(0);
12+
const tvl = resp.data.data.totalValueUsd;
13+
result = parseFloat(tvl);
14+
return result.toFixed(2);
15+
}
16+
17+
module.exports = {
18+
fetch
19+
}

0 commit comments

Comments
 (0)