fix: populate config endpoints with chain and token data #33

Merged
shoko merged 2 commits from fix/issue-27 into main 2026-04-09 08:23:44 +02:00
Showing only changes of commit 786e964e32 - Show all commits

View File

@@ -1,13 +1,19 @@
from fastapi import APIRouter
from ..core.config import get_settings
from ..services.ave import AveCloudClient
router = APIRouter()
@router.get("/chains")
def get_chains():
return {"chains": []}
return {"chains": ["bsc"]}
@router.get("/tokens")
def get_tokens():
return {"tokens": []}
async def get_tokens():
settings = get_settings()
client = AveCloudClient(api_key=settings.AVE_API_KEY, plan=settings.AVE_API_PLAN)
tokens = await client.get_tokens(chain="bsc", limit=100)
Outdated
Review

actually I'd like to limit the tokens to 20 for now. its okay to hardcode for now, we will adjust later if needed

actually I'd like to limit the tokens to 20 for now. its okay to hardcode for now, we will adjust later if needed
return {"tokens": tokens}