fix: populate config endpoints with chain and token data #33
@@ -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)
|
||||
return {"tokens": tokens}
|
||||
|
||||
Reference in New Issue
Block a user