Pagination
All list endpoints in Aeses use cursor-based pagination. Cursors are opaque tokens — never parse or construct them yourself; pass them back exactly as you received them.
Request parameters
| Parameter | Type | Default | Description |
| ---------------- | ------- | ------- | ------------------------------------------------------------------------ |
| limit | integer | 25 | Number of objects to return. Between 1 and 100. |
| starting_after | string | — | Cursor pointing to the last object you saw. Returns objects strictly after it. |
| ending_before | string | — | Cursor for reverse iteration. Returns objects strictly before it. |
You may also pass resource-specific filters (e.g. status, asset, created_after). Filters compose with pagination — apply them on every page request, not just the first.
Response shape
Every paginated response has the same envelope:
{
"object": "list",
"data": [
{ "id": "dep_01HXYZ...", "object": "deposit", "...": "..." },
{ "id": "dep_01HXYW...", "object": "deposit", "...": "..." }
],
"has_more": true,
"next_cursor": "dep_01HXYW..."
}data— the page of objects, in descending creation order by default.has_more—truewhen more objects exist after this page.next_cursor— pass this asstarting_afteron the next request.
When has_more is false, you have reached the end. next_cursor will be null.
Iterating to the end
cursor=""
while true; do
url="https://api.aeses.io/v1/deposits?status=completed&limit=100"
[ -n "$cursor" ] && url="$url&starting_after=$cursor"
response=$(curl -s "$url" -H "x-api-key: sk_live_...")
echo "$response" | jq '.data[]'
has_more=$(echo "$response" | jq -r '.has_more')
[ "$has_more" = "true" ] || break
cursor=$(echo "$response" | jq -r '.next_cursor')
doneDate filters
Resource lists accept created_after and created_before (Unix timestamps, seconds). Use them to scope reconciliation jobs:
curl "https://api.aeses.io/v1/deposits?created_after=$(date -u -v-1H +%s)" \
-H "x-api-key: sk_live_..."Auto-pagination patterns
When you build a reconciliation worker, paginate forward (oldest first) so a checkpoint is easy: store the last id you processed, then start the next run with starting_after=<that id>. To paginate forward, sort the list by passing order=asc.