Skip to content

Commit 4043b40

Browse files
committed
track hyperliquid
1 parent 4f955fa commit 4043b40

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

projects/helper/chains.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@
127127
"hpb",
128128
"hydra",
129129
"hydradx",
130+
"hyperliquid",
130131
"icon",
131132
"icp",
132133
"imx",

projects/hyperliquid-perp/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const { post } = require('../helper/http')
2+
3+
async function tvl(api) {
4+
let data= await post('https://api.hyperliquid.xyz/info', {"type":"tvlBreakdown"})
5+
data = data.find(i => i.protocol === "Hyperliquid Perps DEX")
6+
data.tokens.forEach(i => api.addCGToken('tether', +i.usdcValue))
7+
}
8+
9+
module.exports = {
10+
misrepresentedTokens: true,
11+
hyperliquid: { tvl }
12+
}

projects/hyperliquid-spot/index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const { post } = require('../helper/http')
2+
3+
async function tvl(api) {
4+
let data= await post('https://api.hyperliquid.xyz/info', {"type":"tvlBreakdown"})
5+
data = data.find(i => i.protocol === "Hyperliquid Spot DEX")
6+
data.tokens.forEach(i => api.addCGToken('tether', api.usdcValue))
7+
}
8+
9+
module.exports = {
10+
misrepresentedTokens: true,
11+
hyperliquid: { tvl }
12+
}

0 commit comments

Comments
 (0)