get-transactions.rst (2469B)
1 .. ts:op:: getTransactions 2 :read-only: 3 4 Get the wallet's transaction list, containing past and pending 5 transactions. 6 7 **Request:** 8 9 The request ``args`` must be a `TransactionsRequest` object. 10 11 **Response:** 12 13 On success, the result is a `TransactionsResponse` object. 14 15 **Details:** 16 17 Refresh transactions are excluded from the result unless 18 ``includeRefreshes`` is set. 19 20 With the default sort orders (``ascending`` and ``descending``), 21 pending transactions (major states ``pending``, ``aborting`` and 22 ``dialog``) are listed before all other transactions; within each 23 group, transactions are sorted by their timestamp, and ties are 24 broken by a fixed transaction-type order. With 25 ``stable-ascending``, all transactions are sorted purely by 26 ascending timestamp, so pending transactions do not jump around. 27 28 Filtering by an auditor scope (``scopeInfo`` of type ``auditor``) 29 is not supported and fails with ``WALLET_CORE_API_BAD_REQUEST``. 30 31 .. ts:def:: TransactionsRequest 32 33 interface TransactionsRequest { 34 // Return only transactions in the given currency. 35 // Deprecated: use ``scopeInfo`` instead. 36 currency?: string; 37 38 // Return only transactions in the given scope. 39 scopeInfo?: ScopeInfo; 40 41 // Limit results to transactions related to the given search 42 // string. Currently accepted but not applied by wallet-core. 43 search?: string; 44 45 // Sort order of the transaction items. "ascending" (the 46 // default) and "descending" sort by timestamp but list pending 47 // transactions first; "stable-ascending" sorts purely by 48 // ascending timestamp, with pending transactions in between. 49 sort?: "ascending" | "descending" | "stable-ascending"; 50 51 // If true, include all refreshes in the transaction list. 52 includeRefreshes?: boolean; 53 54 // If set, only return transactions matching the state filter. 55 filterByState?: TransactionStateFilter; 56 } 57 58 .. ts:def:: TransactionStateFilter 59 60 // State filter for the transaction list: only transactions in a 61 // non-final state. 62 type TransactionStateFilter = "nonfinal"; 63 64 .. ts:def:: TransactionsResponse 65 66 interface TransactionsResponse { 67 // List of past and pending transactions matching the request; 68 // see the respective operation for the sort order. 69 transactions: Transaction[]; 70 } 71 72 .. ts:def:: WithdrawalType 73 74 type WithdrawalType = 75 | "taler-bank-integration-api" 76 | "manual-transfer";