Data API

Data API

Base URL: https://api.autara.finance

All endpoints are public GET requests and return JSON. Live market endpoints are served from a 1-second in-memory cache; history endpoints read from Prometheus.

Full interactive schema available at Swagger UI ↗ (opens in a new tab) | OpenAPI JSON ↗ (opens in a new tab)


Markets

GET/v1/markets/summary

Returns a summary of all markets including APY rates, deposit/borrow totals, utilization, and liquidation thresholds.

Response fields
  • source — "cache"
  • asOf — ISO timestamp of the cached snapshot
  • data[] — array of MarketSummary objects
  • data[].id — canonical 64-char hex market address
  • data[].supplyApy — current annualized supply rate
  • data[].borrowApy — current annualized borrow rate
  • data[].totalDepositsUsd — total deposits in USD
  • data[].totalBorrowsUsd — total borrows in USD
  • data[].utilizationRate — current utilization ratio (0–1)
  • data[].availableBorrowTokens — tokens available to borrow
  • data[].collateralFactor — collateral factor (max LTV)
  • data[].liquidationThreshold — liquidation threshold (unhealthy LTV)
curl https://api.autara.finance/v1/markets/summary
GET/v1/markets/{id}

Returns full market detail including LTV config, vault state, oracle prices, and supply vault summary.

Response fields
  • source — "cache"
  • asOf — ISO timestamp of the cached snapshot
  • data.marketId — the market address
  • data.market.market.config.ltvConfig — maxLtv, unhealthyLtv, liquidationBonus
  • data.market.market.collateralVault — mint, decimals, vault address, oracle config
  • data.market.market.supplyVault — mint, decimals, vault address, interest rate state
  • data.market.supplyOracle — rate, confidence
  • data.market.collateralOracle — rate, confidence
  • data.supplyVaultSummary — totalSupply, totalBorrow, utilisationRate, borrowInterestRate, lendingInterestRate
64-char hex market address
curl https://api.autara.finance/v1/markets/dde89af6942d055c5fc7c91f948a23fa4ad44535c093d6e0054a2fdac550a481
GET/v1/markets/{id}/curve

Returns interest-rate curve data points for chart rendering.

Response fields
  • source — "cache"
  • asOf — ISO timestamp
  • data.points[] — array of curve data points
  • data.points[].utilization — utilization ratio (0–1)
  • data.points[].apyBorrowRate — annualized borrow rate
  • data.points[].apyLendingRate — annualized lending rate
64-char hex market address
curl https://api.autara.finance/v1/markets/dde89af6942d055c5fc7c91f948a23fa4ad44535c093d6e0054a2fdac550a481/curve

History

All history endpoints accept optional query parameters to control the time range and resolution. If omitted, start defaults to end - 1 year, end defaults to now, and step defaults to 1h.

GET/v1/history/range

Returns the observed min/max timestamps from Prometheus, showing how much history is available.

Response fields
  • source — "prometheus"
  • observed.start / observed.end — unix timestamps
  • observed.startIso / observed.endIso — ISO formatted
  • observed.sampledStep — sampling interval (e.g. "1h")
  • observed.savedSeconds / observed.savedHours — total duration of saved history
  • observed.query — the underlying Prometheus query
curl https://api.autara.finance/v1/history/range
GET/v1/markets/{id}/history/supply

Returns time-series data of total supply value in USD.

Response fields
  • source — "prometheus"
  • range.start / range.end / range.step — resolved query window
  • series[].labels — metric labels (market_address, asset, liquidity_type)
  • series[].values[] — { ts, value } data points (USD)
64-char hex market address
min | max | unix seconds | unix ms | ISO8601
min | max | unix seconds | unix ms | ISO8601
Prometheus duration — 1m, 5m, 1h, 1d
curl https://api.autara.finance/v1/markets/dde89af6942d055c5fc7c91f948a23fa4ad44535c093d6e0054a2fdac550a481/history/supply
GET/v1/markets/{id}/history/borrow

Returns time-series data of total borrow value in USD.

Response fields
  • source — "prometheus"
  • range.start / range.end / range.step — resolved query window
  • series[].labels — metric labels (market_address, asset, liquidity_type)
  • series[].values[] — { ts, value } data points (USD)
64-char hex market address
min | max | unix seconds | unix ms | ISO8601
min | max | unix seconds | unix ms | ISO8601
Prometheus duration — 1m, 5m, 1h, 1d
curl https://api.autara.finance/v1/markets/dde89af6942d055c5fc7c91f948a23fa4ad44535c093d6e0054a2fdac550a481/history/borrow
GET/v1/markets/{id}/history/collateral

Returns time-series data of total collateral value in USD.

Response fields
  • source — "prometheus"
  • range.start / range.end / range.step — resolved query window
  • series[].labels — metric labels (market_address, asset, liquidity_type)
  • series[].values[] — { ts, value } data points (USD)
64-char hex market address
min | max | unix seconds | unix ms | ISO8601
min | max | unix seconds | unix ms | ISO8601
Prometheus duration — 1m, 5m, 1h, 1d
curl https://api.autara.finance/v1/markets/dde89af6942d055c5fc7c91f948a23fa4ad44535c093d6e0054a2fdac550a481/history/collateral
GET/v1/markets/{id}/history/utilization

Returns time-series data of the market utilization ratio.

Response fields
  • source — "prometheus"
  • range.start / range.end / range.step — resolved query window
  • series[].labels — metric labels (market_address)
  • series[].values[] — { ts, value } data points (ratio 0–1)
64-char hex market address
min | max | unix seconds | unix ms | ISO8601
min | max | unix seconds | unix ms | ISO8601
Prometheus duration — 1m, 5m, 1h, 1d
curl https://api.autara.finance/v1/markets/dde89af6942d055c5fc7c91f948a23fa4ad44535c093d6e0054a2fdac550a481/history/utilization
GET/v1/markets/{id}/history/rates

Returns time-series data of borrow and supply APY rates.

Response fields
  • source — "prometheus"
  • range.start / range.end / range.step — resolved query window
  • series[].labels — metric labels (market_address, rate type)
  • series[].values[] — { ts, value } data points (APY)
64-char hex market address
min | max | unix seconds | unix ms | ISO8601
min | max | unix seconds | unix ms | ISO8601
Prometheus duration — 1m, 5m, 1h, 1d
curl https://api.autara.finance/v1/markets/dde89af6942d055c5fc7c91f948a23fa4ad44535c093d6e0054a2fdac550a481/history/rates
GET/v1/positions/{user}/history/ltv

Returns time-series LTV data for each of the user's borrow positions across all markets.

Response fields
  • source — "prometheus"
  • series[] — one entry per borrow position
  • series[].labels.market_address — the market for this position
  • series[].labels.position_address — the position account
  • series[].labels.user_address — the user pubkey
  • series[].values[] — { ts, value } data points (LTV ratio 0–1)
64-char hex user pubkey
min | max | unix seconds | unix ms | ISO8601
min | max | unix seconds | unix ms | ISO8601
Prometheus duration — 1m, 5m, 1h, 1d
curl https://api.autara.finance/v1/positions/f6cc41111df5410aff54242c92b7a16c59d3968e9adfa3a1a9ffea3308e34f39/history/ltv

User

GET/v1/positions/{user}

Returns all supply and borrow positions for a user across all markets, including real-time health metrics for borrows.

Response fields
  • positions.supplyPositions[] — supply positions
  • positions.supplyPositions[].supplyPosition — authority, market, depositedAtoms, shares
  • positions.supplyPositions[].ownedAtoms — current redeemable amount
  • positions.borrowPositions[] — borrow positions
  • positions.borrowPositions[].borrowPosition — authority, market, collateralDepositedAtoms, borrowedShares
  • positions.borrowPositions[].health.ltv — current loan-to-value ratio
  • positions.borrowPositions[].health.borrowedAtoms — outstanding borrow amount
  • positions.borrowPositions[].health.collateralAtoms — deposited collateral amount
  • positions.borrowPositions[].health.borrowValue — borrow value in USD
  • positions.borrowPositions[].health.collateralValue — collateral value in USD
64-char hex user pubkey
curl https://api.autara.finance/v1/positions/f6cc41111df5410aff54242c92b7a16c59d3968e9adfa3a1a9ffea3308e34f39
GET/v1/balances/{user}

Returns token balances held in the user's wallet.

Response fields
  • balances[] — array of token balances
  • balances[].mint — token mint public key (byte array)
  • balances[].amount — raw token amount in smallest unit
  • balances[].uiAmount — human-readable formatted amount
64-char hex user pubkey
curl https://api.autara.finance/v1/balances/f6cc41111df5410aff54242c92b7a16c59d3968e9adfa3a1a9ffea3308e34f39

Health

GET/v1/health

Returns the status of the data cache poller.

Response fields
  • lastPollAt — unix timestamp (ms) of last successful poll
  • cacheAgeMs — milliseconds since last poll
  • stale — true if cache is considered stale
  • lastPollError — error message if last poll failed, otherwise null
curl https://api.autara.finance/v1/health

Errors

All endpoints return a standard error envelope on failure:

CodeMeaning
BAD_REQUESTInvalid parameters (e.g. start > end, too many data points)
NOT_FOUNDMarket or user not found
UPSTREAM_ERRORPrometheus or cache unavailable
{
  "error": "Invalid request",
  "code": "BAD_REQUEST",
  "details": { "reason": "start must be before end" }
}