Skip to content

A statement for a period. The period is required.

GET
/v1/statements
curl --request GET \
--url 'https://example.com/v1/statements?account=example&asset=example' \
--header 'Authorization: Bearer <token>'

Reads one account’s statement in one asset for a period, with its opening and closing balances. account, asset, from and to are all required; without any of them the request is refused as ERR-QueryUnbounded, and so is from after to, an as_of the book has not reached, and a period of more than 1000 movements (ask for a shorter one, or page through movements). A parameter this route does not know, a value that does not parse (from=abc) and an account or asset that is not a valid identifier or symbol are refused as ERR-MalformedCommand (amendment 0032, REQ-ER-3).

account
required

The account, as a did:aledgent:acct: identifier. Required: a missing one is ERR-QueryUnbounded (REQ-CS-5).

string | null
as_of

Read at this view, for a statement that must not move: the view of an earlier balances or movements read. A view the book has not reached is refused.

integer | null format: uint64
asset
required

The asset, by its symbol. Required, as account is.

string | null
from

The period’s start, in milliseconds since the Unix epoch. Inclusive. Required.

integer | null format: uint64
to

The period’s end, in milliseconds since the Unix epoch. Exclusive. Required.

integer | null format: uint64

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

Media typeapplication/json

statement (SPEC §8.2).

object
account
required

The account.

string
asset
required

The asset.

string
closed
required

Whether the period is closed: no posting can still enter it.

boolean
closing
required

The closing balances.

object
available
required

Available.

string
encumbered
required

Encumbered.

string
reserved
required

Reserved.

string
from
required

The period’s start.

integer format: uint64
from_seq
required

The first posting of the period.

integer format: uint64
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
opening
required

The opening balances.

object
available
required

Available.

string
encumbered
required

Encumbered.

string
reserved
required

Reserved.

string
to
required

The period’s end.

integer format: uint64
to_seq
required

The last.

integer format: uint64
Examplegenerated
{
"account": "example",
"asset": "example",
"closed": true,
"closing": {
"available": "example",
"encumbered": "example",
"reserved": "example"
},
"from": 1,
"from_seq": 1,
"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"
}
],
"opening": {
"available": "example",
"encumbered": "example",
"reserved": "example"
},
"to": 1,
"to_seq": 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)).