Skip to content

Instantly share code, notes, and snippets.

@patcito
Last active February 23, 2026 20:18
Show Gist options
  • Select an option

  • Save patcito/76e64e346f2a36d5d237b65e311ba72a to your computer and use it in GitHub Desktop.

Select an option

Save patcito/76e64e346f2a36d5d237b65e311ba72a to your computer and use it in GitHub Desktop.
ftUSD Dashboard API changes — new fields for frontend

ftUSD Dashboard API — Frontend Integration Guide

Endpoint

GET /status/ftusd/dashboard

Query params:

  • days — number of days for series (default 7, max 360)
  • include_series — include historical series (default true)
  • include_events — include recent events (default false)
  • event_limit — max events to return (default 100, max 1000)
  • include_raw — include verbose raw objects: ftUSD, mintAndRedeem, stakingVault, circuitBreaker detail, APY breakdown, per-chain series (default false)

By default the response is clean and matches the mock format. Use ?include_raw=true to get the full verbose response.


Default response (matches mock)

All numeric values are numbers (not strings). Timestamps are date-only (YYYY-MM-DD).

{
  "success": true,
  "chains": [{
    "chainId": 146,
    "chainName": "Sonic",
    "tvlUsd": 100000000.0,
    "circuitBreakerParams": {
      "tvlUsd": 100000000.0,
      "maxDrawRatePct": 0.5,
      "mainBufferUsd": 100000000.0,
      "mainWindowHrs": 6.0,
      "elasticWindowHrs": 2.0,
      "replenishmentTimeFormatted": "1:23:45"
    },
    "metrics": {
      "totalSupply": 600000000.0,
      "totalSupplyUsd": 600000000.0,
      "totalSupplyChangePct": 0.1,
      "totalStaked": 300000000.0,
      "totalStakedUsd": 300000000.0,
      "totalStakedChangePct": 0.1,
      "currentAPY": 5.2
    },
    "collaterals": [{
      "address": "0x29219dd400f2Bf60E5a23d13Be72B486D4038894",
      "symbol": "USDC",
      "tvlAmount": 100000000.0,
      "tvlAmountUsd": 100000000.0,
      "sharePct": 100.0,
      "circuitBreakerStatus": {
        "amount": 100000000.0,
        "mainBuffer": 100000000.0,
        "elasticBuffer": 100000000.0,
        "availableToWithdraw": 200000000.0,
        "isLowAvailability": false
      }
    }]
  }],
  "series": {
    "price":        [{ "timestamp": "2026-01-01", "value": 1.0 }],
    "ftUsdSupply":  [{ "timestamp": "2026-01-01", "value": 600000000.0 }],
    "sftUsdSupply": [{ "timestamp": "2026-01-01", "value": 300000000.0 }],
    "apy":          [{ "timestamp": "2026-01-01", "value": 5.2 }]
  },
  "lastUpdated": "2026-02-23T12:00:00Z",
  "cacheAgeMs": 0
}

No ftUSD, mintAndRedeem, stakingVault, circuitBreaker, events, metrics.apy, or metrics.series clutter by default.


TypeScript types (drop-in replacement for mock)

interface SeriesPoint {
  timestamp: string;  // "YYYY-MM-DD"
  value: number;
}

interface CircuitBreakerParams {
  tvlUsd: number;
  maxDrawRatePct: number;
  mainBufferUsd: number;
  mainWindowHrs: number;
  elasticWindowHrs: number;
  replenishmentTimeFormatted: string;
}

interface CircuitBreakerStatus {
  amount: number;
  mainBuffer: number;
  elasticBuffer: number;
  availableToWithdraw: number;
  isLowAvailability: boolean;
}

interface Collateral {
  address: string;
  symbol: string;
  tvlAmount: number;
  tvlAmountUsd: number;
  sharePct: number;
  circuitBreakerStatus?: CircuitBreakerStatus;
}

interface ChainMetrics {
  totalSupply: number;
  totalSupplyUsd: number;
  totalSupplyChangePct: number;
  totalStaked: number;
  totalStakedUsd: number;
  totalStakedChangePct: number;
  currentAPY: number;
}

interface DashboardSeries {
  price: SeriesPoint[];
  ftUsdSupply: SeriesPoint[];
  sftUsdSupply: SeriesPoint[];
  apy: SeriesPoint[];
}

interface ChainDashboard {
  chainId: number;
  chainName: string;
  tvlUsd: number;
  circuitBreakerParams?: CircuitBreakerParams;
  metrics?: ChainMetrics;
  collaterals?: Collateral[];
}

interface FtUSDDashboardData {
  success: boolean;
  chains: ChainDashboard[];
  series?: DashboardSeries;
  lastUpdated: string;
  cacheAgeMs: number;
}

Verbose mode

Add ?include_raw=true to get additional nested objects:

  • chains[].ftUSD — token data (address, totalSupply raw, decimals)
  • chains[].mintAndRedeem — full collateral details with raw amounts
  • chains[].stakingVault — vault data (totalAssets, totalSupply, exchangeRate)
  • chains[].circuitBreaker — detailed CB status with per-asset buffers
  • chains[].metrics.apy — full APY breakdown (1w, 1m, 3m, 6m, 1y, allTime)
  • chains[].metrics.series — per-chain time series with {date, valueUsd} format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment