Skip to content

Commit

Permalink
add more fields to markets
Browse files Browse the repository at this point in the history
  • Loading branch information
Manh Cao authored and Manh Cao committed Sep 5, 2024
1 parent 30e9082 commit 5974cfc
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions backend-api-demo/src/get-list-markets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ interface MarketInfo {
sy: {
id: string;
};
liquidity: {
usd: number;
acc: number;
};
underlyingInterestApy: number;
underlyingRewardApy: number,
underlyingApy: number;
impliedApy: number;
ytFloatingApy: number;
aggregatedApy: number;
maxBoostedApy: number;
lpRewardApy: number;
voterApy: number;
}

interface Response {
Expand Down Expand Up @@ -64,10 +77,11 @@ export async function getMarkets() {

console.log('result info', {limit, total, skip});

const {name, address, expiry, pt, sy, yt} = markets[0];
const {name, address, expiry, pt, sy, yt, liquidity, impliedApy, aggregatedApy, underlyingApy, lpRewardApy, underlyingInterestApy, underlyingRewardApy, maxBoostedApy, voterApy, ytFloatingApy} = markets[0];
const {id: ptId} = pt;
const {id: syId} = sy;
const {id: ytId} = yt;
const {usd: liquidityUSD } = liquidity;

console.log('first active market', {name, address, expiry, ptId, syId, ytId});
console.log('first active market', {name, address, expiry, ptId, syId, ytId, liquidityUSD, impliedApy, aggregatedApy, underlyingApy, lpRewardApy, underlyingInterestApy, underlyingRewardApy, maxBoostedApy, voterApy, ytFloatingApy });
}

0 comments on commit 5974cfc

Please sign in to comment.