Skip to content

A page of movements, filtered, with a cursor. A limit is required.

GET
/v1/movements
curl --request GET \
--url https://example.com/v1/movements \
--header 'Authorization: Bearer <token>'

Lists the entries made against a subject’s accounts, oldest first, one page at a time. Name exactly one subject: account or identity. Naming both, or neither, is refused as ERR-QueryUnbounded. limit is required, from 1 to 1000; a request without it, or past it, is refused the same way. from and to come together, in milliseconds since the Unix epoch: from is inclusive and to is exclusive, and from may not be after to. A parameter this route does not know, a value that does not parse (limit=ten), a direction that is neither debit nor credit, an account, identity or asset that is not a valid identifier or symbol, and a cursor that is not hex are refused as ERR-MalformedCommand (amendment 0032, REQ-ER-3), never ignored. A page may hold fewer movements than limit and still carry next: keep passing next back as cursor until a page comes without one.

account

The subject: one account, as a did:aledgent:acct: identifier.

string | null
asset

Only this asset, by its symbol.

string | null
counterparty

Only against this counterparty: the ledger account on the other side of the movement.

string | null
cursor

The previous page’s next, passed back unchanged. It belongs to the request that made it: a cursor sent with other filters is refused.

string | null
direction

Only debit or credit; any other value is refused as ERR-MalformedCommand.

string | null
from

From this time, in milliseconds since the Unix epoch. Inclusive: a movement at exactly this time is returned. Send it together with to.

integer | null format: uint64
identity

The subject: one identity, as a did:aledgent:id: identifier. Every account of it the caller reaches is read.

string | null
limit

The page size, from 1 to 1000. Required: an unbounded page is refused. Any value made of digits is a count, and one above 1000 is outside the bound (ERR-QueryUnbounded), however many digits it has; a value that is not made of digits is a shape fault (ERR-MalformedCommand).

integer | null format: uint64
on_account

Only movements on this account, which must be one of the subject’s (useful when the subject is an identity).

string | null
to

Up to this time, in milliseconds since the Unix epoch. Exclusive: a movement at exactly this time is not returned. Send it together with from.

integer | null format: uint64

The answer, from one consistent view (REQ-QR-2).

Media typeapplication/json

A page of movements (REQ-QR-5).

object
movements
required

The movements.

Array<object>

One movement: one entry against one account.

object
account
required

The account.

string
amount
required

Minor units.

string
asset
required

The asset.

string
at
required

The posting’s time.

integer format: uint64
authorities
required

The authorities that caused it.

Array<object>

An authority a posting relied on, and who used it (REQ-AU-7, INV-20).

object
credential
required

The credential it presented.

string
grant

The grant, where one was used.

string | null
kind
required

owner, delegated, operator, issuance or recovery.

string
on_behalf_of

Whom it acted for.

string | null
principal
required

The principal that used it.

string
balance
required

available, reserved or encumbered.

string
counterparty

The ledger account on the other side, where there is one.

string | null
direction
required

debit or credit.

string
kind
required

The posting’s kind.

string
operation
required

The operation.

string
reference
Any of:

Pass-through data (REQ-PO-5): any one JSON value, at most 1024 bytes of UTF-8 as sent. Kept and echoed exactly as sent; never read by aledgent. Over the bound, or not one JSON value, the command is refused with ERR-MalformedCommand.

seq
required

The posting’s sequence number.

integer format: uint64
status
required

held, completed, returned, reversed or opening.

string
next

The cursor of the next page, hex.

string | null
view
required

The view it was read at.

integer format: uint64
Examplegenerated
{
"movements": [
{
"account": "example",
"amount": "example",
"asset": "example",
"at": 1,
"authorities": [
{
"credential": "example",
"grant": "example",
"kind": "example",
"on_behalf_of": "example",
"principal": "example"
}
],
"balance": "example",
"counterparty": "example",
"direction": "example",
"kind": "example",
"operation": "example",
"reference": "example",
"seq": 1,
"status": "example"
}
],
"next": "example",
"view": 1
}

Refused, with the named condition. The status is the alternative’s x-http-status.

Media typeapplication/json
One of:
ERR-NotAuthorised
object
description
required
Allowed value: The initiating principal holds no authority that covers this operation, account, asset or bound
error
required
Allowed value: ERR-NotAuthorised
Example
{
"description": "The initiating principal holds no authority that covers this operation, account, asset or bound",
"error": "ERR-NotAuthorised"
}

Refused, with the named condition. The status is the alternative’s x-http-status.

Media typeapplication/json
One of:
ERR-NotAuthorised
object
description
required
Allowed value: The initiating principal holds no authority that covers this operation, account, asset or bound
error
required
Allowed value: ERR-NotAuthorised
Example
{
"description": "The initiating principal holds no authority that covers this operation, account, asset or bound",
"error": "ERR-NotAuthorised"
}
Retry-After
integer

On ERR-DecisionUnavailable (503): seconds to wait before retrying with the same client key (DEC-27 (g)).