v1

latestOpenAPI 3.0.32026-07-1765123145.7 KB
ledger.v1

List transactions from a ledger

List transactions from a ledger, sorted by txid in descending order.

get/{ledger}/transactions

Path parameters

ledgerstring required
Example:ledger001

Name of the ledger.

Query parameters

pageSizeinteger

The maximum number of results to return per page.

page_sizeinteger

The maximum number of results to return per page. Deprecated, please use pageSize instead.

afterstring

Pagination cursor, will return transactions after given txid (in descending order).

referencestring
Example:ref:001

Find transactions by reference field.

accountstring
Example:users:001

Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $).

sourcestring
Example:users:001

Filter transactions with postings involving given account at source (regular expression placed between ^ and $).

destinationstring
Example:users:001

Filter transactions with postings involving given account at destination (regular expression placed between ^ and $).

startTimestring date-time

Filter transactions that occurred after this timestamp. The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).

start_timestring date-time

Filter transactions that occurred after this timestamp. The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute). Deprecated, please use startTime instead.

endTimestring date-time

Filter transactions that occurred before this timestamp. The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).

end_timestring date-time

Filter transactions that occurred before this timestamp. The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute). Deprecated, please use endTime instead.

cursorstring
Example:aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==

Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set.

pagination_tokenstring
Example:aHR0cHM6Ly9nLnBhZ2UvTmVrby1SYW1lbj9zaGFyZQ==

Parameter used in pagination requests. Maximum page size is set to 1000. Set to the value of next for the next page of results. Set to the value of previous for the previous page of results. No other parameters can be set when this parameter is set. Deprecated, please use cursor instead.

metadataobject

Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below.

Response

OK

Example response

{
  "cursor": {
    "pageSize": 15,
    "previous": "YXVsdCBhbmQgYSBtYXhpbXVtIG1heF9yZXN1bHRzLol=",
    "data": [
      {
        "postings": [
          {
            "amount": 100,
            "asset": "COIN",
            "destination": "users:002",
            "source": "users:001"
          }
        ],
        "reference": "ref:001",
        "preCommitVolumes": {
          "orders:1": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          },
          "orders:2": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          }
        },
        "postCommitVolumes": {
          "orders:1": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          },
          "orders:2": {
            "USD": {
              "input": 100,
              "output": 10,
              "balance": 90
            }
          }
        }
      }
    ]
  }
}