iridium_walletd getTransactions method

The getTransactions method returns an array of block and transaction hashes.

back to methods summary

A transaction consists of transfers. Transfer is an amount-address pair. There could be several transfers in a single transaction.

back to methods summary

Input:

ArgumentMandatoryDescriptionFormatExample
addresses No Array of (string) addressarray
blockHashOnly one of these parameters : blockHash or firstBlockIndex.Hash of the starting blockstringa314c9b51605e6258e263425838fc24d5ab87e367b8e2c2fc9b3ca51079681e9
firstBlockIndexOnly of these parameters : blockHash or firstBlockIndex.Starting heightuint321500
blockCount Yes Number of blocks to return transaction hashes fromuint3210
paymentId No Valid stringsomePaymentId

Note: if paymentId parameter is set, getTransactions method returns transactions that contain specified payment_id. (in the set block range)

Note: if addresses parameter is set, getTransactions method returns transactions that contain transfer from at least one of specified addresses.

Note: if both above mentioned parameters are set, getTransactions method returns transactions that contain both specified payment_id and transfer from at least one of specified addresses.

Output:

Array that contains:

  • block_hash - string - hash of the block which contains a transaction
  • transactions - array - contains
    • transactionHash - string - hash of the transaction
    • blockIndex - uint32 - number of the block that contains a transaction
    • timestamp - uint64 - timestamp of the transaction
    • isBase - boolean - shows if the transaction is a coinbase transaction or not
    • unlockTime - uint64 - height of the block when transaction is going to be available for spending
    • amount - int64 - amount of the transaction
    • fee - uint64- transaction fee
    • extra - string
    • paymentId - string - payment_id of the transaction (optional)
    • transfers - array - contains
      • address - string
      • amount - int64

Input example:

{  
  'params':{  
     'blockCount':10,
     'firstBlockIndex':1500,
     'addresses':[  
        'ir44wUHAMndSscvtYErtqUaYrcUTvrZ9zhWwxc3JtkBHAnw4FJqenZyaePSApKWwJ5BjCJz1fKJoA6QHn5j6bVHg8A8dyhp',
        'ir2K6FuYL4vYvLFQx2ene92JNHip8YGyJGHCCNjPwoFE2RsRYwtzPC7aePSApKWwJ5BjCJz1fKJoA6QHn5j6bVHg8DRRpU1',
        'ir3wwZ6Ju6gGeztrtHjsj42xWLavrXPN1PrpnNKGXCMcLACj2WhGqYwaePSApKWwJ5BjCJz1fKJoA6QHn5j6bVHg8A4Z9K8'
     ],
     paymentId:'somePaymentId'
  },
  'jsonrpc':'2.0',
  'id':'test',
  'method':'getTransactions'
}

Output example:

{  
  'jsonrpc':'2.0',
  'id':'test',
  'result':{  
     'items':[  
        {  
           'blockHash':'01bd06ca731914f27e143bbb902ce0bc05bff13d76faa027ea817e68f217488c',
           'transactions':[  
              {  
                 'fee':5000,
                 'extra':'0127cea59bfadc49aa02ed4a225936671e55607b5241621abca2a5e14405906dbb',
                 'timestamp':1446029698,
                 'blockIndex':1,
                 'state':0,
                 'transactionHash':'06ec210a8359f253f8b2160a0d6040cf89f2a05a553aaa577b7f508ee5d831f9',
                 'amount':70368475742208,
                 'unlockTime':11,
                 'transfers':[  
                    {  
                       'amount':70368475742208,
                       'type':0,
                       'address':'ir44wUHAMndSscvtYErtqUaYrcUTvrZ9zhWwxc3JtkBHAnw4FJqenZyaePSApKWwJ5BjCJz1fKJoA6QHn5j6bVHg8A8dyhp'
                    }
                 ],
                 'paymentId':,
                 'isBase':True
              }
           ]
        },
        {  
           'blockHash':'28aa7d32f4274f6387969d7671bd4db98fd871bf0dd510a1df5e2ef4b1d41a35',
           'transactions':[  
              {  
                 'fee':5000,
                 'extra':'01a8e6e408282b2ddf343e20d5e9aab283723ba10ab7ab7b3131f6981b02a84431',
                 'timestamp':1446029698,
                 'blockIndex':2,
                 'state':0,
                 'transactionHash':'922d00d2e6eaed63f62d8e3b968cb08b6ea5c555fe0e6af948ab06efe6eb213a',
                 'amount':70368207307776,
                 'unlockTime':12,
                 'transfers':[  
                    {  
                       'amount':70368207307776,
                       'type':0,
                       'address':'ir2K6FuYL4vYvLFQx2ene92JNHip8YGyJGHCCNjPwoFE2RsRYwtzPC7aePSApKWwJ5BjCJz1fKJoA6QHn5j6bVHg8DRRpU1'
                    }
                 ],
                 'paymentId':,
                 'isBase':True
              }
           ]
        }
     ]
  }
}