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"
  • asOfISO timestamp of the cached snapshot
  • data[]array of MarketSummary objects
  • data[].idcanonical 64-char hex market address
  • data[].supplyApycurrent annualized supply rate
  • data[].borrowApycurrent annualized borrow rate
  • data[].totalDepositsUsdtotal deposits in USD
  • data[].totalBorrowsUsdtotal borrows in USD
  • data[].utilizationRatecurrent utilization ratio (0–1)
  • data[].availableBorrowTokenstokens available to borrow
  • data[].collateralFactorcollateral factor (max LTV)
  • data[].liquidationThresholdliquidation 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"
  • asOfISO timestamp of the cached snapshot
  • data.marketIdthe market address
  • data.market.market.config.ltvConfigmaxLtv, unhealthyLtv, liquidationBonus
  • data.market.market.collateralVaultmint, decimals, vault address, oracle config
  • data.market.market.supplyVaultmint, decimals, vault address, interest rate state
  • data.market.supplyOraclerate, confidence
  • data.market.collateralOraclerate, confidence
  • data.supplyVaultSummarytotalSupply, 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"
  • asOfISO timestamp
  • data.points[]array of curve data points
  • data.points[].utilizationutilization ratio (0–1)
  • data.points[].apyBorrowRateannualized borrow rate
  • data.points[].apyLendingRateannualized 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.endunix timestamps
  • observed.startIso / observed.endIsoISO formatted
  • observed.sampledStepsampling interval (e.g. "1h")
  • observed.savedSeconds / observed.savedHourstotal duration of saved history
  • observed.querythe 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.stepresolved query window
  • series[].labelsmetric 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.stepresolved query window
  • series[].labelsmetric 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.stepresolved query window
  • series[].labelsmetric 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.stepresolved query window
  • series[].labelsmetric 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.stepresolved query window
  • series[].labelsmetric 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_addressthe market for this position
  • series[].labels.position_addressthe position account
  • series[].labels.user_addressthe 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[].supplyPositionauthority, market, depositedAtoms, shares
  • positions.supplyPositions[].ownedAtomscurrent redeemable amount
  • positions.borrowPositions[]borrow positions
  • positions.borrowPositions[].borrowPositionauthority, market, collateralDepositedAtoms, borrowedShares
  • positions.borrowPositions[].health.ltvcurrent loan-to-value ratio
  • positions.borrowPositions[].health.borrowedAtomsoutstanding borrow amount
  • positions.borrowPositions[].health.collateralAtomsdeposited collateral amount
  • positions.borrowPositions[].health.borrowValueborrow value in USD
  • positions.borrowPositions[].health.collateralValuecollateral 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[].minttoken mint public key (byte array)
  • balances[].amountraw token amount in smallest unit
  • balances[].uiAmounthuman-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
  • lastPollAtunix timestamp (ms) of last successful poll
  • cacheAgeMsmilliseconds since last poll
  • staletrue if cache is considered stale
  • lastPollErrorerror 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" }
}