Skip to main content
You can compute yield generated, withdrawn, and accrued deltas over any period for one or more yield wallets. If you omit dates, the API computes lifetime values; if you omit wallet ids, it returns global metrics across all wallets for your profile. Request period metrics
curl -X POST "$BASE_URL/yield-wallets/yield" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "periodStartIso": "2025-01-01T00:00:00Z",
    "periodEndIso": "2025-02-01T00:00:00Z",
    "yieldWalletIds": ["5b10530c-6dbe-40ee-9664-29b36e5ad80f"]
  }'
200 response
{
  "period": {
    "start": "2025-01-01T00:00:00.000Z",
    "end": "2025-02-01T00:00:00.000Z"
  },
  "global": { "generated": 0.000007, "withdrawn": 0, "accruedDelta": 0.000007 },
  "yieldWallets": {
    "5b10530c-6dbe-40ee-9664-29b36e5ad80f": {
      "generated": 0.000007,
      "withdrawn": 0,
      "accruedDelta": 0.000007
    }
  }
}
Use these figures to render account statements, compute summaries for monthly reporting, or display high-level performance. The API ensures that time-windowed calculations reconcile with your withdrawals and snapshots over the same period. Example: powering a “Last 30d” dashboard metric You can show a live “Last 30d” yield number by requesting a window from 30 days ago until now. If you want a single, portfolio-wide number, omit yieldWalletIds and read from global. If you prefer a specific wallet, pass its id in yieldWalletIds and read from the per-wallet map. Compute the period and request metrics (macOS example)
START=$(date -u -v-30d +%Y-%m-%dT%H:%M:%SZ)
END=$(date -u +%Y-%m-%dT%H:%M:%SZ)

curl -s -X POST "$BASE_URL/yield-wallets/yield" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"periodStartIso\":\"$START\",\"periodEndIso\":\"$END\"}"
200 response (fields per swagger)
{
  "period": {
    "start": "2025-01-01T00:00:00.000Z",
    "end": "2025-02-01T00:00:00.000Z"
  },
  "global": { "generated": 0.000007, "withdrawn": 0, "accruedDelta": 0.000007 },
  "yieldWallets": {}
}
Choosing the value to display For an attention-grabbing “Last 30d” number, many teams display global.generated (total yield generated in the period). If you want the net change to on-platform accrued yield, display global.accruedDelta. Both are returned alongside withdrawn to support statements and audits. Optional: restrict to a specific wallet
curl -s -X POST "$BASE_URL/yield-wallets/yield" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"periodStartIso\":\"$START\",\"periodEndIso\":\"$END\",\"yieldWalletIds\":[\"<wallet-id>\"]}"
Rendering tips Update the value on a reasonable cadence (for example, when the dashboard mounts and then on a short interval) and format to your preferred precision. Because yield accrues in real time, even small frequent refreshes can increase engagement.