Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.1tx.fi/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Yield Index API exposes daily benchmark series for each asset category, per-instrument compounded growth, alpha versus the benchmark, rolling yield features, and pairwise instrument correlations. All endpoints are under the global /api/v1 prefix and use X-API-Key authentication. Supported asset categories are USD, EUR, ETH, and BTC.
APY values are returned as decimals, not percentages. For example, 0.052 means 5.2% APY.

Methodology

The category index is a daily, TVL-weighted benchmark over active instruments in the same assetCategory. Key details:
  • Instruments with daily TVL at or below $100,000 are excluded from the category aggregate for that day.
  • Each instrument’s index weight is capped at 20% before the aggregate APY is calculated.
  • indexApy uses total APY, including rewards.
  • indexApyBase uses base APY only, excluding rewards where the source provides a split.
  • Growth curves compound daily with growth = product(1 + apy / 365).
  • Instrument syntheticGrowthTotal compounds total APY, while syntheticGrowthBase compounds base APY.
  • pricePerShare is returned when the upstream source provides realized vault share-price data.

Get Yield Index

GET /yield-index/:category Retrieve the daily category benchmark series, including index APY, compounded growth, TVL, and index-level rolling features.

Request

curl -H "X-API-Key: your-api-key" \
  "https://api.1tx.fi/api/v1/yield-index/USD?from=2026-01-01&to=2026-05-01"

Path Parameters

ParameterTypeRequiredDescription
categorystringYesAsset category: USD, EUR, ETH, or BTC

Query Parameters

ParameterTypeRequiredDescription
fromstringNoInclusive start date in YYYY-MM-DD format
tostringNoInclusive end date in YYYY-MM-DD format

Response

[
  {
    "day": "2026-05-01",
    "indexApy": 0.0412,
    "indexApyBase": 0.0387,
    "indexGrowth": 1.1864,
    "indexGrowthBase": 1.1721,
    "totalTvlUsd": 1200000000,
    "indexApyMean30d": 0.0405,
    "indexApyStdev30d": 0.0031,
    "indexApyCv30d": 0.0765,
    "indexApyObsCount30d": 30,
    "indexApyMean90d": 0.0398,
    "indexApyStdev90d": 0.0042,
    "indexApyCv90d": 0.1055,
    "indexApyObsCount90d": 90,
    "indexApyMean365d": 0.0431,
    "indexApyStdev365d": 0.0069,
    "indexApyCv365d": 0.1601,
    "indexApyObsCount365d": 365
  }
]

Response Fields

FieldTypeDescription
daystringUTC calendar day in YYYY-MM-DD format
indexApynumberTVL-weighted total category APY for the day
indexApyBasenumberTVL-weighted base category APY for the day
indexGrowthnumberDaily-compounded growth of $1 using indexApy
indexGrowthBasenumberDaily-compounded growth of $1 using indexApyBase
totalTvlUsdnumberTotal eligible TVL in USD before weight caps
indexApyMean{30,90,365}dnumber | nullRolling mean of indexApy over the window
indexApyStdev{30,90,365}dnumber | nullRolling standard deviation of indexApy over the window
indexApyCv{30,90,365}dnumber | nullRolling coefficient of variation, stdev / mean
indexApyObsCount{30,90,365}dnumberNumber of non-null daily observations in the rolling window

Get Index Features

GET /yield-index/:category/features Retrieve the same index-level feature shape returned by GET /yield-index/:category. This alias is useful when consumers want to treat category features separately from instrument features.

Request

curl -H "X-API-Key: your-api-key" \
  "https://api.1tx.fi/api/v1/yield-index/USD/features?from=2026-04-01"

Parameters

Same as Get Yield Index.

Response

Same shape as Get Yield Index.

Get Instrument Yield Series

GET /yield-index/instrument/:id Retrieve a daily instrument yield series with APY, TVL, optional price-per-share, and compounded synthetic growth curves.

Request

curl -H "X-API-Key: your-api-key" \
  "https://api.1tx.fi/api/v1/yield-index/instrument/0x00002105c053a3e1290845e12a3eea14926472ce7f15da324cdf0700056fc04b?from=2026-01-01"

Path Parameters

ParameterTypeRequiredDescription
idstringYesPublic instrument ID, or internal UUID when applicable

Query Parameters

ParameterTypeRequiredDescription
fromstringNoInclusive start date in YYYY-MM-DD format
tostringNoInclusive end date in YYYY-MM-DD format

Response

[
  {
    "instrumentId": "0x00002105c053a3e1290845e12a3eea14926472ce7f15da324cdf0700056fc04b",
    "assetCategory": "USD",
    "protocolName": "Aave",
    "chainId": 8453,
    "tokenSymbol": "USDC",
    "description": "Aave V3 USDC lending pool on Base",
    "day": "2026-05-01",
    "apy": 0.0452,
    "apyBase": 0.0431,
    "apyReward": 0.0021,
    "tvlUsd": 1250000000,
    "pricePerShare": null,
    "syntheticGrowthTotal": 1.1172,
    "syntheticGrowthBase": 1.1094
  }
]

Response Fields

FieldTypeDescription
instrumentIdstringPublic instrument identifier
assetCategorystringInstrument asset category
protocolNamestring | nullProtocol name
chainIdnumberChain ID
tokenSymbolstring | nullUnderlying token symbol
descriptionstring | nullHuman-readable instrument description
daystringUTC calendar day in YYYY-MM-DD format
apynumberTotal APY for the day, including rewards
apyBasenumber | nullBase APY for the day
apyRewardnumber | nullReward APY for the day
tvlUsdnumberTotal value locked in USD
pricePerSharenumber | nullRealized vault share price when available from the source
syntheticGrowthTotalnumberDaily-compounded growth using total APY
syntheticGrowthBasenumberDaily-compounded growth using base APY

Get Instrument vs Index

GET /yield-index/instrument/:id/vs-index Retrieve an instrument series joined to its asset-category index for the same days. This endpoint adds index APY, index growth, and alpha.

Request

curl -H "X-API-Key: your-api-key" \
  "https://api.1tx.fi/api/v1/yield-index/instrument/0x00002105c053a3e1290845e12a3eea14926472ce7f15da324cdf0700056fc04b/vs-index?from=2026-01-01"

Parameters

Same as Get Instrument Yield Series.

Response

[
  {
    "instrumentId": "0x00002105c053a3e1290845e12a3eea14926472ce7f15da324cdf0700056fc04b",
    "assetCategory": "USD",
    "protocolName": "Aave",
    "chainId": 8453,
    "tokenSymbol": "USDC",
    "description": "Aave V3 USDC lending pool on Base",
    "day": "2026-05-01",
    "apy": 0.0452,
    "apyBase": 0.0431,
    "apyReward": 0.0021,
    "tvlUsd": 1250000000,
    "pricePerShare": null,
    "syntheticGrowthTotal": 1.1172,
    "syntheticGrowthBase": 1.1094,
    "indexApy": 0.0412,
    "indexApyBase": 0.0387,
    "indexGrowth": 1.1864,
    "indexGrowthBase": 1.1721,
    "alpha": -0.0692
  }
]

Additional Response Fields

FieldTypeDescription
indexApynumberCategory index total APY for the day
indexApyBasenumberCategory index base APY for the day
indexGrowthnumberCategory index compounded growth using total APY
indexGrowthBasenumberCategory index compounded growth using base APY
alphanumberInstrument total growth minus category index total growth

Get Instrument Features

GET /yield-index/instrument/:id/features Retrieve daily rolling features for an instrument, including APY stability metrics, percentile bands, reward share, TVL growth, alpha versus the index, beta to the index APY, and alpha drawdown.

Request

curl -H "X-API-Key: your-api-key" \
  "https://api.1tx.fi/api/v1/yield-index/instrument/0x00002105c053a3e1290845e12a3eea14926472ce7f15da324cdf0700056fc04b/features?from=2026-04-01&to=2026-05-01"

Parameters

Same as Get Instrument Yield Series.

Response

[
  {
    "day": "2026-05-01",
    "instrumentId": "0x00002105c053a3e1290845e12a3eea14926472ce7f15da324cdf0700056fc04b",
    "assetCategory": "USD",
    "apyMean30d": 0.0441,
    "apyStdev30d": 0.0043,
    "apyCv30d": 0.0975,
    "apyP1030d": 0.0386,
    "apyP9030d": 0.0512,
    "apyObsCount30d": 30,
    "apyMean90d": 0.0434,
    "apyStdev90d": 0.0051,
    "apyCv90d": 0.1175,
    "apyP1090d": 0.0368,
    "apyP9090d": 0.0524,
    "apyObsCount90d": 90,
    "apyMean365d": 0.0462,
    "apyStdev365d": 0.0087,
    "apyCv365d": 0.1883,
    "apyP10365d": 0.0341,
    "apyP90365d": 0.0603,
    "apyObsCount365d": 365,
    "apyZscore90d": 0.35,
    "rewardShare": 0.0465,
    "tvlGrowth7d": 0.012,
    "tvlGrowth30d": 0.084,
    "alpha30d": 0.0011,
    "alpha90d": -0.0048,
    "beta90d": 0.82,
    "betaR290d": 0.43,
    "alphaCurrentDd": -0.0062,
    "alphaMaxDd365d": -0.0314,
    "alphaDdDurationDays": 42
  }
]

Response Fields

FieldTypeDescription
daystringUTC calendar day in YYYY-MM-DD format
instrumentIdstringPublic instrument identifier
assetCategorystringInstrument asset category
apyMean{30,90,365}dnumber | nullRolling mean of instrument APY over the window
apyStdev{30,90,365}dnumber | nullRolling standard deviation of instrument APY over the window
apyCv{30,90,365}dnumber | nullRolling coefficient of variation, stdev / mean
apyP10{30,90,365}dnumber | nullRolling 10th percentile of instrument APY over the window
apyP90{30,90,365}dnumber | nullRolling 90th percentile of instrument APY over the window
apyObsCount{30,90,365}dnumberNumber of non-null daily APY observations in the rolling window
apyZscore90dnumber | nullCurrent APY relative to the 90-day distribution
rewardSharenumber | nullCurrent apyReward / apy
tvlGrowth7dnumber | nullTVL growth over 7 days, calculated as current / lag - 1
tvlGrowth30dnumber | nullTVL growth over 30 days, calculated as current / lag - 1
alpha30dnumber | nullInstrument growth minus index growth over the trailing 30-day window
alpha90dnumber | nullInstrument growth minus index growth over the trailing 90-day window
beta90dnumber | nullRolling slope of instrument APY regressed on category index APY
betaR290dnumber | nullR-squared of the rolling 90-day APY regression
alphaCurrentDdnumber | nullCurrent drawdown of the alpha curve from its running high
alphaMaxDd365dnumber | nullWorst alpha-curve drawdown over the trailing year
alphaDdDurationDaysnumber | nullDays since the alpha curve last reached a high
beta90d is sensitivity of quoted APY to the category index APY. It is not CAPM beta on investment returns.

Get Correlations

GET /yield-index/correlations/:category Retrieve pairwise instrument correlations for an asset category. Correlations are computed on daily APY changes, not APY levels, to reduce bias from autocorrelated yield series. By default, this endpoint returns the latest available day and the 90 day window.

Request

curl -H "X-API-Key: your-api-key" \
  "https://api.1tx.fi/api/v1/yield-index/correlations/USD?day=2026-05-01&window=90"

Path Parameters

ParameterTypeRequiredDescription
categorystringYesAsset category: USD, EUR, ETH, or BTC

Query Parameters

ParameterTypeRequiredDescription
daystringNoCorrelation matrix day in YYYY-MM-DD format. Defaults to the latest available day.
windownumberNoRolling window to return: 30, 90, or 365. Defaults to 90.
instrumentIdstringNoLimit results to pairs containing this instrument. Accepts public instrument ID or internal UUID.

Response

[
  {
    "day": "2026-05-01",
    "instrumentAId": "0x00002105c053a3e1290845e12a3eea14926472ce7f15da324cdf0700056fc04b",
    "instrumentBId": "0x00002105e1d832a44e229e784c3d4afba9a1ca44a288e34f7e5ddcba23155adc",
    "assetCategory": "USD",
    "corr": 0.27,
    "overlapDays": 90,
    "window": 90,
    "instrumentAName": "Aave V3 USDC lending pool on Base",
    "instrumentBName": "Morpho USDC vault on Base",
    "instrumentAProtocol": "Aave",
    "instrumentBProtocol": "Morpho",
    "instrumentAApy": 0.0452,
    "instrumentBApy": 0.0508,
    "instrumentAApyCv90d": 0.1175,
    "instrumentBApyCv90d": 0.1392
  }
]

Response Fields

FieldTypeDescription
daystringUTC calendar day in YYYY-MM-DD format
instrumentAIdstringFirst public instrument identifier
instrumentBIdstringSecond public instrument identifier
assetCategorystringShared asset category for the pair
corrnumber | nullPearson correlation over the requested window
overlapDaysnumberNumber of overlapping daily APY-change observations in the window
windownumberReturned rolling window, one of 30, 90, or 365
instrumentANamestring | nullFirst instrument description
instrumentBNamestring | nullSecond instrument description
instrumentAProtocolstring | nullFirst instrument protocol
instrumentBProtocolstring | nullSecond instrument protocol
instrumentAApynumber | nullLatest current APY for the first instrument
instrumentBApynumber | nullLatest current APY for the second instrument
instrumentAApyCv90dnumber | nullFirst instrument’s 90-day APY coefficient of variation on day
instrumentBApyCv90dnumber | nullSecond instrument’s 90-day APY coefficient of variation on day
Use overlapDays to filter sparse pairs. For example, a 365-day correlation with only 40 overlapping observations is usually not robust enough for portfolio construction.

Refresh Yield Index Views

POST /yield-index/refresh Refresh the yield-index materialized views without ingesting new upstream metrics. Most users do not need this endpoint; the normal metrics sync pipeline refreshes the views automatically.

Request

curl -X POST \
  -H "X-API-Key: your-api-key" \
  "https://api.1tx.fi/api/v1/yield-index/refresh"

Response

{
  "success": true,
  "durationMs": 322,
  "timestamp": "2026-05-01T12:00:00.000Z"
}

TypeScript Example

const BASE_URL = 'https://api.1tx.fi/api/v1';
const API_KEY = process.env['1TX_API_KEY'];

async function getUsdIndex(from?: string) {
  const params = new URLSearchParams();
  if (from) params.set('from', from);

  const response = await fetch(`${BASE_URL}/yield-index/USD?${params}`, {
    headers: { 'X-API-Key': API_KEY ?? '' },
  });

  if (!response.ok) {
    throw new Error(`Failed to fetch yield index: ${response.status}`);
  }

  return response.json();
}

async function getInstrumentAlpha(instrumentId: string) {
  const response = await fetch(
    `${BASE_URL}/yield-index/instrument/${instrumentId}/vs-index`,
    { headers: { 'X-API-Key': API_KEY ?? '' } }
  );

  if (!response.ok) {
    throw new Error(`Failed to fetch instrument alpha: ${response.status}`);
  }

  return response.json();
}

Next Steps

Metrics API

Fetch raw historical APY and TVL data

Instruments API

Discover instrument IDs and metadata