Skip to content

Commit

Permalink
use aa_last7d instead of daa, use fundamentals instead of fundamental…
Browse files Browse the repository at this point in the history
…s_full
  • Loading branch information
mseidlx authored Dec 10, 2024
1 parent 31660ce commit cc0343d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/api/fetchGrowThePie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ const TXCOSTS_MEDIAN_USD = "txcosts_median_usd"
const TXCOUNT = "txcount"

export const fetchGrowThePie = async (): Promise<GrowThePieData> => {
const url = "https://api.growthepie.xyz/v1/fundamentals_full.json"
const url = "https://api.growthepie.xyz/v1/fundamentals.json"

const response = await fetch(url)
if (!response.ok) {
console.log(response.status, response.statusText)
throw new Error("Failed to fetch GrowThePie data")
throw new Error("Failed to fetch growthepie data")
}
const data: DataItem[] = await response.json()

Expand All @@ -27,7 +27,7 @@ export const fetchGrowThePie = async (): Promise<GrowThePieData> => {

const activeAddresses = data
.filter((item) => item.date === mostRecentDate)
.filter((item) => item.metric_key === "daa")
.filter((item) => item.metric_key === "aa_last7d")
.reduce((acc, item) => {
return {
...acc,
Expand Down

0 comments on commit cc0343d

Please sign in to comment.