getTransfers
查詢您在 Akashic 上的交易
此函式 (function) 使用一組可選參數,以取得更特定的交易子集
page&limit用於分頁。頁面為零索引。允許的限制值有 10、25、50 和 100。status將結果限制為僅 「待定」、「已確認」 或 「已失敗」 的交易transactionType將結果限制為進/出交易。「存款 」或 「提款」startDate和endDate依時間限制結果hideSmallTransactions設為 true 可排除價值低於 1 美元的交易identifier依identifier篩選結果referenceId依referenceId篩選結果
注意: l2Txnhash (「L2-hash」) 應該始終用作交易的唯一識別碼 (identifier)。這是 AkashicChain 上任何交易的唯一交易哈希 (transaction-hash)。它存在於已確認的存款和待定/已確認的付款中。這對於第二層交易尤其重要,因為第二層交易沒有第一層哈希值 (txHash)
注意:internalFee 是指在 AkashicChain 上交易的 L2 相關費用。
範例
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,
});$transactions = akashicPay.getTransfers([
"page" => 0,
"limit" => 10,
"layer" => "L1Transaction",
"status" => "Confirmed",
"startDate" => date('2024-01-01),
"endDate" => date('2025-01-01'),
"hideSmallTransactions" => True
]);APTransactionsParam param = APTransactionsParam.builder(0, 10, new Date(2024,1,1), new Date(2025,1,1), APTransactionLayer.L1Transaction, APTransactionStatus.Confirmed, true).build();
APTransfersResult result = akashicPay.getTransfers(l2Address, param);回調範例
Last updated
Was this helpful?