You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Get current snapshot of all metrics
curl https://api.flyingtulip.com/tge/metrics
# Get FT value history (for charts)
curl "https://api.flyingtulip.com/tge/metrics/series?metric=ft_allocation&period=1w"# Get TVL history (for charts)
curl "https://api.flyingtulip.com/tge/metrics/series?metric=collateral_supply&asset=0x29219dd400f2bf60e5a23d13be72b486d4038894&period=1w"# Get yield history (for charts)
curl "https://api.flyingtulip.com/tge/metrics/series?metric=strategy_allocation&field=yield_claimed&strategy=0x06c0eeafe8ea72882b24d05d509d6d1733cb4a3a&chainId=146&period=1w"
// Total FT Value in USD (divide by 10^8)constftValueUsd=Number(data.ft_allocation.chains[0].value_usd)/1e8;// Total Investment in USD (sum all assets, divide by 10^8)consttotalInvestmentUsd=data.collateral_supply.chains[0].assets.reduce((sum,a)=>sum+Number(a.value_usd),0)/1e8;// All Time Yield (divide by 10^decimals)constyieldClaimed=data.strategy_allocation.entries.reduce((sum,e)=>sum+Number(e.yield_claimed)/Math.pow(10,e.yield_decimals),0);
2. Time Series (Historical Data for Charts)
Base Endpoint
GET /tge/metrics/series
Parameters
Parameter
Required
Description
metric
Yes
ft_allocation, collateral_supply, or strategy_allocation
period
No
1d, 1w, 1m, 3m, 6m, 1y, all (default: 1d)
asset
For collateral_supply
Asset contract address
strategy
For strategy_allocation
Strategy or wrapper address
field
For strategy_allocation
allocated or yield_claimed
chainId
For strategy_allocation
Chain ID (e.g., 146 for Sonic)
2.1 FT Value History
GET /tge/metrics/series?metric=ft_allocation&period=1w
// Fetch and format for chart libraryasyncfunctiongetFTValueChart(period='1w'){constres=awaitfetch(`/tge/metrics/series?metric=ft_allocation&period=${period}`);const{ data }=awaitres.json();returndata.points.map(p=>({date: newDate(p.timestamp),value: Number(p.value)/Math.pow(10,p.decimals)}));}
Notes
All amounts are strings to preserve precision
value_usd fields have 8 decimals (divide by 1e8)
Time series data is bucketed in 15-minute intervals
Data is updated every 15 minutes by background jobs