getTransfers

查詢您在 Akashic 上的交易

此函式 (function) 使用一組可選參數,以取得更特定的交易子集

  • page & limit 用於分頁。頁面為零索引。允許的限制值有 10、25、50 和 100。

  • layer 限制結果為第一層第二層交易

  • status 將結果限制為僅 「待定」、「已確認」 或 「已失敗」 的交易

  • transactionType 將結果限制為進/出交易。「存款 」或 「提款」

  • startDateendDate 依時間限制結果

  • hideSmallTransactions 設為 true 可排除價值低於 1 美元的交易

  • identifieridentifier 篩選結果

  • referenceIdreferenceId 篩選結果

注意: 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,
});

回調範例

Last updated

Was this helpful?