Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to weekly active addresses and smaller growthepie API endpoint #14478

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading