Nolus Docs
ETL data API

Overview

What data the Nolus ETL exposes and how to query it.

The Nolus ETL (extract-transform-load) is a Rust service that ingests Nolus chain state in real time, transforms it into normalized records, and serves a read-only HTTP API. The webapp and other Nolus services consume it to surface indexed protocol data - prices, positions, lender state, treasury flows - without each having to run its own node + indexer.

What's in there

The ETL aggregates blockchain events, smart-contract state, and oracle prices into a PostgreSQL store and exposes the result as 70+ REST endpoints. Below is a tour of the data surface grouped by concern.

Configuration

Which protocols and currencies the chain currently understands.

PathWhat it returns
GET /api/protocolsAll protocols, active and deprecated.
GET /api/protocols/activeActive protocols only.
GET /api/protocols/{name}A single protocol by name.
GET /api/currenciesAll currencies, active and deprecated.
GET /api/currencies/activeActive currencies only.
GET /api/currencies/{ticker}A single currency by ticker.

Treasury and incentives

Protocol-revenue side: where NLS flows in and out.

PathWhat it returns
GET /api/revenueTotal protocol revenue to date.
GET /api/distributedTotal distributed rewards.
GET /api/buybackBuyback history (?period=3m|6m|12m|all).
GET /api/buyback-totalTotal buyback amount.
GET /api/incentives-poolCurrent incentives-pool balance.
GET /api/earnings?address=Earnings for one address.

Platform-wide metrics

The numbers you'd put on a dashboard.

PathWhat it returns
GET /api/total-value-lockedPlatform TVL.
GET /api/supplied-fundsTotal supplied funds.
GET /api/borrowedTotal borrowed (optional ?protocol=).
GET /api/open-interestOpen-interest value.
GET /api/supplied-borrowed-historyHistorical series for both.

Positions and leases

Per-position state, scoped by address or pulled in aggregate.

PathWhat it returns
GET /api/positionsAll currently open positions.
GET /api/leases?address=Leases owned by a given address.
GET /api/liquidationsLiquidation history.
GET /api/historically-openedHistorical position openings.

Liquidity pools

LPP utilisation and lender state.

PathWhat it returns
GET /api/poolsAll pools with utilisation and APR.
GET /api/utilization-level?protocol=Pool utilisation history.
GET /api/current-lendersActive lenders.
GET /api/historical-lendersLender history.

Pricing, blocks, subscriptions

Cross-cutting endpoints for oracle prices, chain head, and push-notification subscriptions used by the webapp.

PathWhat it returns
GET /api/pricesCurrent oracle prices.
GET /api/blocks/...Indexed blocks.
GET /api/subscriptions/...Webapp push-notification subscriptions.

Filtering and exports

Most list endpoints share a few query-string conventions:

  • ?format=csv - return CSV instead of JSON.
  • ?period=3m|6m|12m|all - time-window filter on history endpoints.
  • ?from=<timestamp> - incremental sync filter; only rows updated since the given timestamp.
  • ?export=true - streaming CSV export of the full result set, for bulk pulls that would otherwise paginate.

Caching

Responses are cached at the API layer with per-endpoint TTLs. Treat the ETL as a near-real-time view of chain state - subsecond for live positions and prices, slightly stale for aggregates that don't need real-time updates. If you need strictly authoritative chain state, go to RPC/gRPC directly; the ETL is optimised for analytics-style queries that an RPC node would answer slowly or not at all.

On this page