API
Tonnected HTTP API
Tonnected exposes its server-cached, edge-rendered routes as a thin internal API. They proxy and cache the upstream providers documented on the methodology page. Public, no auth required for read endpoints; keep call volume reasonable.
| Method | Path | Returns |
|---|---|---|
| GET | /api/markets | Top jetton markets on TON. Add `?trending=1` for trending. |
| GET | /api/protocols | TVL leaderboard for TON DeFi (DefiLlama, chain-filtered). |
| GET | /api/stablecoins | Stablecoin circulating supply on TON. |
| GET | /api/jettons/[address] | Token detail: GeckoTerminal token info + DexScreener pairs + OHLCV. |
| GET | /api/portfolio/[address] | TON balance, jetton holdings, total USD value for a wallet. |
| GET | /api/status | Live upstream-provider health probe. |
Caching
Hot endpoints (markets, portfolio) cache for 30s; protocols and stablecoins cache for 5m. All routes ship cache-control headers and Next.js revalidate tags so you can purge a single tag rather than the whole cache.