Skip to content

Commit

Permalink
static nimbus metadata api
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed Sep 8, 2023
1 parent 9a19307 commit 20c1663
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ require('dotenv').config();
const { scheduleLiquidation } = require('./src/liquidation');
const { getPrices } = require('./src/pricing');
const { getStats } = require('./src/stats');
const { getNimbusData } = require('./src/nimbus.js');

const port = process.env.PORT || 3000;

Expand All @@ -21,6 +22,8 @@ const server = http.createServer(async (req, res) => {
res.end(JSON.stringify(await getPrices()));
} else if (req.url === '/stats') {
res.end(JSON.stringify(await getStats()));
} else if (req.url === '/nimbus') {
res.end(JSON.stringify(await getNimbusData()));
}
res.end();
});
Expand Down
32 changes: 32 additions & 0 deletions src/nimbus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const getNimbusData = async _ => {
return [
{
contractAddress: '0x3d9907f9a368ad0a51be60f7da3b97cf940982d8',
name: 'GRAIL',
updatedAt: 1694177638,
opportunities: [
{
apy: 0.63,
tvl: 145_968,
link: 'https://app.thestandard.io/yield'
}
]
},
{
contractAddress: '0xf5A27E55C748bCDdBfeA5477CB9Ae924f0f7fd2e',
name: 'TST',
updatedAt: 1694177638,
opportunities: [
{
apy: 5,
tvl: 60_000,
link: 'https://app.thestandard.io/yield'
}
]
}
]
}

module.exports = {
getNimbusData
}

0 comments on commit 20c1663

Please sign in to comment.