Skip to content

REST API

The Alula REST API provides read-only access to protocol state: markets, pool snapshots, historical data, and token metadata. All data is derived from on-chain state indexed by the Alula collector service.

Authentication: None required. All endpoints are public and read-only.

Conventions

Pagination

List endpoints use cursor-based pagination. The response includes a next_cursor field when more pages exist. Pass it as the cursor query parameter to fetch the next page. When next_cursor is omitted (not null), you have reached the last page.

ParameterTypeDescription
cursorstringOpaque cursor from a previous response
limitintegerMaximum items per page

Amounts

All monetary values (total_supplied, total_borrowed, tvl_usd_cents) are returned as decimal strings (Amount type) because they may exceed the safe integer range.

Rates and ratios

APYs (supply_apy_bps, borrow_apy_bps) and utilization (utilization_bps) are expressed in basis points (1 bps = 0.01%).

Conditional requests

Most endpoints support ETag / If-None-Match headers, returning 304 Not Modified when data has not changed.

Error format

Errors follow the application/problem+json convention:

json
{
  "type": "/errors/400",
  "title": "Bad Request",
  "status": 400,
  "detail": "Malformed contract strkey.",
  "field": "market"
}
FieldTypeDescription
typestringURI reference identifying the problem type
titlestringHTTP status reason phrase
statusintegerHTTP status code
detailstringHuman-readable explanation
fieldstring?The offending query/path parameter, when known