getTransfers

Query your transactions on Akashic

This function takes a set of optional parameters to get a more specific subset of transactions

  • page & limit For pagination. Page is zero-indexed. Allowed limit-values are 10, 25, 50, and 100

  • layer Limit results to just Layer 1 or Layer 2 transactions

  • status Limit results to only "Pending", "Confirmed", or "Failed" transactions

  • transactionType Limit results to ingoing or outgoing transactions. "Deposit" or "Withdraw"

  • startDate and endDate Limit results by time

  • hideSmallTransactions Set to true to exclude transactions below 1 USD in value

Note: l2Txnhash (the "L2-hash") should always be used as the unique identifier of a transaction. This is a unique transaction-hash for any transaction on AkashicChain. It is present for Confirmed deposits and Pending/Confirmed payouts. This is particularly important for the case of Layer 2 transactions, which will not have a Layer 1 hash (txHash)

Example

const transactions = await akashicPay.getTransfers({
    page: 0,
    limit: 10,
    layer: TransactionLayer.L1,
    status: TransactionStatus.CONFIRMED,
    startDate: new Date('2024-01-01'),
    endDate: new Date('2025-01-01'),
    hideSmallTransactions: true
});

Return Example

[
    {
      "fromAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
      "toAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
      "layer": TransactionLayer.L1,
      "date": "2024-08-19T10:03:58.649Z",
      "amount": "1.000000",
      "coinSymbol": NetworkSymbol.Tron_Shasta,
      "status": TransactionStatus.CONFIRMED,
      "txHash": "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc",
      "internalFee": {
        "deposit": "0.100000"
      },
      "l2TxnHash": "ASe7eb1cb8193787040fcffa02a224a6ced7415ff2205343c0ab661e898e8d6eef",
    },
    {
      "fromAddress": "TQH8ygbS8BAnzSQ9uxR9vXHJYMQVRvbgPg",
      "toAddress": "TTVkK6hGoAFhALG9NTkUDHjcFFXKmWcScU",
      "layer": TransactionLayer.L1,
      "date": "2024-08-19T10:03:58.649Z",
      "amount": "100.000000",
      "coinSymbol": NetworkSymbol.Tron_Shasta,
      "status": TransactionStatus.CONFIRMED,
      "txHash": "28a9880ad2ef3b7be1c40763128ec9630ab74e4749a3c81037c3501e4209bfcc",
      "internalFee": {
        "deposit": "0.100000"
      },
      "feesPaid": "14.123456",
      "l2TxnHash": "ASe7eb1cb8193787040fcffa02a224a6ced7415ff2205343c0ab661e898e8d6eef",
    },
]

Last updated