get-transactions-v2.rst (3143B)
1 .. ts:op:: getTransactionsV2 2 :read-only: 3 4 Get the wallet's transaction list, with support for paginated 5 queries. 6 7 **Request:** 8 9 The request ``args`` must be a `GetTransactionsV2Request` object. 10 11 **Response:** 12 13 On success, the result is a `TransactionsResponse` object. 14 15 **Details:** 16 17 Without a ``limit`` and without an offset, all matching 18 transactions are returned in ascending timestamp order. 19 20 With a positive ``limit``, at most ``limit`` transactions are 21 returned in ascending order: without an offset starting at the 22 first transaction, with an offset starting after the offset. With 23 a negative ``limit``, at most ``-limit`` transactions are returned 24 in descending order: without an offset starting at the last 25 transaction, with an offset starting before the offset. 26 Transactions with equal timestamps are ordered by their 27 ``transactionId``. 28 29 If the ``offsetTransactionId`` no longer exists (for example 30 because the transaction was deleted), ``offsetTimestamp`` is used 31 as a fallback anchor. If the offset transaction does not exist 32 and no ``offsetTimestamp`` is given, the request fails with 33 ``WALLET_TRANSACTION_NOT_FOUND``. 34 35 Refresh transactions are excluded unless ``includeRefreshes`` (or 36 ``includeAll``) is set; payments that were superseded by a 37 repurchase are excluded unless ``includeAll`` is set. 38 39 .. ts:def:: GetTransactionsV2Request 40 41 interface GetTransactionsV2Request { 42 // Return only transactions in the given currency. 43 currency?: string; 44 45 // Return only transactions in the given scope. 46 scopeInfo?: ScopeInfo; 47 48 // If true, include all refreshes in the transaction list. 49 includeRefreshes?: boolean; 50 51 // If true, include transactions that would usually be filtered 52 // out. Implies ``includeRefreshes``. 53 includeAll?: boolean; 54 55 // Only return transactions before/after this offset. 56 offsetTransactionId?: TransactionIdStr; 57 58 // Only return transactions before/after the transaction with 59 // this timestamp. Used as a fallback if the 60 // ``offsetTransactionId`` was deleted. 61 offsetTimestamp?: TalerPreciseTimestamp; 62 63 // Number of transactions to return. When positive, results are 64 // returned in ascending timestamp order (starting at the first 65 // transaction or after the offset). When negative, results 66 // are returned in descending timestamp order (starting at the 67 // last transaction or before the offset). 68 limit?: number; 69 70 // Filter transactions by their state / state category. 71 // If not specified, all transactions are returned. 72 // "final": transactions in any final state; 73 // "nonfinal": transactions in any state but the final states; 74 // "nonfinal-dialog": nonfinal transactions that require 75 // confirmation / some choice by the user; 76 // "nonfinal-approved": nonfinal transactions that need no 77 // further user approval; 78 // "done": transactions in the "done" major state. 79 filterByState?: 80 | "final" 81 | "nonfinal" 82 | "done" 83 | "nonfinal-approved" 84 | "nonfinal-dialog"; 85 }