uDegen Score API
Last updated
{
"success": true,
"data": [
{
"network": "ethereum",
"address": "0xAbC123...def",
"totalScore": 87.5
},
{
"network": "solana",
"address": "So1Ana...",
"totalScore": null
}
]
}JSON{
"success": false,
"error": "Internal Server Error"
}TypeScripttype CoinScore = {
network: string;
address: string;
totalScore: number | null;
};
type ScoreResponse =
| { success: true; data: CoinScore[] }
| { success: false; error: string };
async function fetchCoinScores(): Promise<CoinScore[]> {
const res = await fetch("https://udegen.io/api/coins/score");
const json: ScoreResponse = await res.json();
if (!json.success) throw new Error(json.error);
return json.data;
}