Marketplace has launched, further enabling blockchain developers! Learn more

Contents

avm.getAddressTxs RPC method

The API credit value for this method is 1 . To learn more about API credits and each method's value, visit the API Credits page.

Parameters:

  1. address - String - The address for which we're fetching related transactions
  2. cursor - uint64 - (optional) The page number or offset. Leave empty to get the first page.
  3. assetID - String - Only return transactions that changed the balance of this asset. Must be an ID or an alias for an asset.
  4. pageSize - uint64 - (optional) The number of items to return per page. Optional. Defaults to 1024.

Returns:

  1. txIDs - []string - The list of transaction IDs that affected the balance of this address.
  2. cursor - uint64 - The page number or offset. Use this in request to get the next page.

Code Examples:

const ethers = require("ethers");

(async () => {
  const provider = new ethers.providers.JsonRpcProvider(
    "http://sample-endpoint-name.network.quiknode.pro/token-goes-here/ext/bc/X"
  );
  const params = {
    "address": "X-avax19pm62y5n0yt76wgp8pd7jdhepmppc67y7yg0cq",
    "assetID": "AVAX",
    "pageSize": 20,
  };
  const result = await provider.send("avm.getAddressTxs", params);
  console.log(result);
})();
Ready to get started? Create a free account