Guides
API principles

Pagination and filters

Walk lists with a cursor and narrow results with the filters parameter in bracket syntax.

The API's lists (accounts, operations, beneficiaries, subscriptions and webhook execution logs) use cursor pagination and accept the filters parameter. The UBO and funding instruction lists return a plain array, without pagination.

Pagination parameters

ParameterDefaultDescription
limit10Items per page, from 1 to 100
cursorCursor returned by a previous page
directionNEXTNEXT or PREVIOUS, from the cursor
sortOrderDESCENDINGDESCENDING (newest first) or ASCENDING, by createdAt

Response

json
{
  "data": [ { "id": "06b57ef0-f2ed-4d1b-a833-a2d0ed2ebeb3" } ],
  "meta": {
    "previousCursor": null,
    "nextCursor": "YWNjb3VudDoyMDI2LTExLTA1VDIwOjEwOjMxWnwwNmI1N2VmMC1mMmVkLTRkMWItYTgzMy1hMmQwZWQyZWJlYjM",
    "total": 1
  }
}
FieldDescription
previousCursorCursor of the previous page; null on the first
nextCursorCursor of the next page; null on the last
totalNumber of items in this page, not in the whole list

Treat the cursor as opaque. In Mimicr it is base64 of <resource>:<createdAt>|<id>; the |<id> suffix is Mimicr's choice to keep the cursor unique. A cursor from another resource answers 400 INVALID_DATA with INVALID_CURSOR, and a limit outside 1 to 100 answers 400 INVALID_DATA.

Walk every page

bash
curl --url 'https://trace.mimicr.dev/v1/accounts?limit=10' \
  --header 'Authorization: Bearer <token>'

curl --url 'https://trace.mimicr.dev/v1/accounts?limit=10&cursor=<nextCursor>' \
  --header 'Authorization: Bearer <token>'
python
cursor = None
while True:
    params = {"limit": 100}
    if cursor:
        params["cursor"] = cursor
    page = client.get("/v1/operations", params=params).json()
    for item in page["data"]:
        process(item)
    cursor = page["meta"]["nextCursor"]
    if cursor is None:
        break

Filters

The format is field[operator]=value. Fields are dotted paths over the resource JSON, such as owner.type or currentState.status.

OperatorMeaningExample
eqEqualsid[eq]=399ca839-abd5-4a7d-981b-f187e7777ec8
neNot equalcurrentState.status[ne]=FAILED
gt, gteGreater, greater or equalcreatedAt[gte]=2026-11-01T00:00:00Z
lt, lteLess, less or equalsourceAmount.value[lt]=1000
in, ninIn or not in a listsee below
likeContains, case-insensitiveowner.legalName[like]=acme
textText searchexternalId[text]=order
lastLast array element equalsstates.status[last]=ACTIVE
last_neLast array element differsstates.status[last_ne]=REJECTED

In in and nin lists, values are separated by a pipe:

text
intent.type[in]=DEPOSIT|WITHDRAW

Use null for the null value: externalId[eq]=null.

Combine conditions

  • Groups separated by ; are AND-ed.
  • and(...) and or(...) group conditions separated by commas.
text
states.status[last]=ACTIVE;owner.type[eq]=COMPANY
and(createdAt[gte]=2026-11-01T00:00:00Z,createdAt[lt]=2026-12-01T00:00:00Z)
or(intent.type[eq]=SWAP,intent.type[eq]=TRANSFER)
bash
curl --get --url https://trace.mimicr.dev/v1/accounts \
  --data-urlencode 'filters=states.status[last]=ACTIVE' \
  --data-urlencode 'limit=10' \
  --header 'Authorization: Bearer <token>'

A malformed filter answers:

json
{
  "code": "INVALID_FILTER_FORMAT",
  "message": "Invalid filter format: 'owner.type=COMPANY'",
  "details": { "filters": "owner.type=COMPANY" }
}

List-specific parameters

  • List operations also accepts intentType (DEPOSIT, WITHDRAW, SWAP, TRANSFER) and status; an invalid value answers 422 INVALID_DATA.
  • List funding instructions accepts asset and rail.
  • Get a report requires periodStart and periodEnd and accepts filters on account.id, asset, direction and intent.type.