Contents

getTransactionsV2read-only#

Get the wallet’s transaction list, with support for paginated queries.

Request:

The request args must be a GetTransactionsV2Request object.

Response:

On success, the result is a TransactionsResponse object.

Details:

Without a limit and without an offset, all matching transactions are returned in ascending timestamp order.

With a positive limit, at most limit transactions are returned in ascending order: without an offset starting at the first transaction, with an offset starting after the offset. With a negative limit, at most -limit transactions are returned in descending order: without an offset starting at the last transaction, with an offset starting before the offset. Transactions with equal timestamps are ordered by their transactionId.

If the offsetTransactionId no longer exists (for example because the transaction was deleted), offsetTimestamp is used as a fallback anchor. If the offset transaction does not exist and no offsetTimestamp is given, the request fails with WALLET_TRANSACTION_NOT_FOUND.

Refresh transactions are excluded unless includeRefreshes (or includeAll) is set; payments that were superseded by a repurchase are excluded unless includeAll is set.

interface GetTransactionsV2Request {
  // Return only transactions in the given currency.
  currency?: string;

  // Return only transactions in the given scope.
  scopeInfo?: ScopeInfo;

  // If true, include all refreshes in the transaction list.
  includeRefreshes?: boolean;

  // If true, include transactions that would usually be filtered
  // out.  Implies includeRefreshes.
  includeAll?: boolean;

  // Only return transactions before/after this offset.
  offsetTransactionId?: TransactionIdStr;

  // Only return transactions before/after the transaction with
  // this timestamp.  Used as a fallback if the
  // offsetTransactionId was deleted.
  offsetTimestamp?: TalerPreciseTimestamp;

  // Number of transactions to return.  When positive, results are
  // returned in ascending timestamp order (starting at the first
  // transaction or after the offset).  When negative, results
  // are returned in descending timestamp order (starting at the
  // last transaction or before the offset).
  limit?: number;

  // Filter transactions by their state / state category.
  // If not specified, all transactions are returned.
  // "final": transactions in any final state;
  // "nonfinal": transactions in any state but the final states;
  // "nonfinal-dialog": nonfinal transactions that require
  //   confirmation / some choice by the user;
  // "nonfinal-approved": nonfinal transactions that need no
  //   further user approval;
  // "done": transactions in the "done" major state.
  filterByState?:
    | "final"
    | "nonfinal"
    | "done"
    | "nonfinal-approved"
    | "nonfinal-dialog";
}