:doc:`ManagedBlockchainQuery <../../managedblockchain-query>` / Client / list_transactions

*****************
list_transactions
*****************



.. py:method:: ManagedBlockchainQuery.Client.list_transactions(**kwargs)

  

  Lists all the transaction events for a transaction.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/managedblockchain-query-2023-05-04/ListTransactions>`_  


  **Request Syntax**
  ::

    response = client.list_transactions(
        address='string',
        network='ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET',
        fromBlockchainInstant={
            'time': datetime(2015, 1, 1)
        },
        toBlockchainInstant={
            'time': datetime(2015, 1, 1)
        },
        sort={
            'sortBy': 'TRANSACTION_TIMESTAMP',
            'sortOrder': 'ASCENDING'|'DESCENDING'
        },
        nextToken='string',
        maxResults=123,
        confirmationStatusFilter={
            'include': [
                'FINAL'|'NONFINAL',
            ]
        }
    )
    
  :type address: string
  :param address: **[REQUIRED]** 

    The address (either a contract or wallet), whose transactions are being requested.

    

  
  :type network: string
  :param network: **[REQUIRED]** 

    The blockchain network where the transactions occurred.

    

  
  :type fromBlockchainInstant: dict
  :param fromBlockchainInstant: 

    The container for time.

    

  
    - **time** *(datetime) --* 

      The container of the ``Timestamp`` of the blockchain instant.

       

      .. note::

        

        This ``timestamp`` will only be recorded up to the second.

        

      

    
  
  :type toBlockchainInstant: dict
  :param toBlockchainInstant: 

    The container for time.

    

  
    - **time** *(datetime) --* 

      The container of the ``Timestamp`` of the blockchain instant.

       

      .. note::

        

        This ``timestamp`` will only be recorded up to the second.

        

      

    
  
  :type sort: dict
  :param sort: 

    The order by which the results will be sorted.

    

  
    - **sortBy** *(string) --* 

      Defaults to the value ``TRANSACTION_TIMESTAMP``.

      

    
    - **sortOrder** *(string) --* 

      The container for the *sort order* for ``ListTransactions``. The ``SortOrder`` field only accepts the values ``ASCENDING`` and ``DESCENDING``. Not providing ``SortOrder`` will default to ``ASCENDING``.

      

    
  
  :type nextToken: string
  :param nextToken: 

    The pagination token that indicates the next set of results to retrieve.

    

  
  :type maxResults: integer
  :param maxResults: 

    The maximum number of transactions to list.

     

    Default: ``100``

     

    .. note::

      

      Even if additional results can be retrieved, the request can return less results than ``maxResults`` or an empty array of results.

       

      To retrieve the next set of results, make another request with the returned ``nextToken`` value. The value of ``nextToken`` is ``null`` when there are no more results to return

      

    

  
  :type confirmationStatusFilter: dict
  :param confirmationStatusFilter: 

    This filter is used to include transactions in the response that haven't reached `finality <https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality>`__. Transactions that have reached finality are always part of the response.

    

  
    - **include** *(list) --* **[REQUIRED]** 

      The container to determine whether to list results that have only reached `finality <https://docs.aws.amazon.com/managed-blockchain/latest/ambq-dg/key-concepts.html#finality>`__. Transactions that have reached finality are always part of the response.

      

    
      - *(string) --* 

      
  
  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'transactions': [
              {
                  'transactionHash': 'string',
                  'transactionId': 'string',
                  'network': 'ETHEREUM_MAINNET'|'ETHEREUM_SEPOLIA_TESTNET'|'BITCOIN_MAINNET'|'BITCOIN_TESTNET',
                  'transactionTimestamp': datetime(2015, 1, 1),
                  'confirmationStatus': 'FINAL'|'NONFINAL'
              },
          ],
          'nextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **transactions** *(list) --* 

        The array of transactions returned by the request.

        
        

        - *(dict) --* 

          The container of the transaction output.

          
          

          - **transactionHash** *(string) --* 

            The hash of a transaction. It is generated when a transaction is created.

            
          

          - **transactionId** *(string) --* 

            The identifier of a Bitcoin transaction. It is generated when a transaction is created.

            
          

          - **network** *(string) --* 

            The blockchain network where the transaction occurred.

            
          

          - **transactionTimestamp** *(datetime) --* 

            The time when the transaction occurred.

            
          

          - **confirmationStatus** *(string) --* 

            Specifies whether to list transactions that have not reached Finality.

            
      
    
      

      - **nextToken** *(string) --* 

        The pagination token that indicates the next set of results to retrieve.

        
  
  **Exceptions**
  
  *   :py:class:`ManagedBlockchainQuery.Client.exceptions.ThrottlingException`

  
  *   :py:class:`ManagedBlockchainQuery.Client.exceptions.ValidationException`

  
  *   :py:class:`ManagedBlockchainQuery.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`ManagedBlockchainQuery.Client.exceptions.InternalServerException`

  
  *   :py:class:`ManagedBlockchainQuery.Client.exceptions.ServiceQuotaExceededException`

  