Transfers​

Transfers

Get list of transfers

  • Typescript Core SDK

📚SDK REFERENCE

  • listTransfers

Request

Get the list of the last 5 transfers made on XpansionChain:

const getListTransfers = async (
  orderBy:
    | 'transaction_id'
    | 'updated_at'
    | 'created_at'
    | 'sender_ether_key'
    | 'receiver_ether_key',
  pageSize: number
) => {
  const response = await client.listTransfers({
    orderBy,
    pageSize,
  });
  return response;
};
getListTransfers('updated_at', 5)
  .then((result) => {
    console.log(result);
  })
  .catch((e) => {
    console.log(e);
  });

Example response

{
  result: [
    {
      transaction_id: 56779, // Sequential transaction ID
      status: 'success', // Status of the transaction
      user: '0xd1a147a26a6f2b414694d2a7161515bdbd97ddbe',       // Ethereum address of the user  who submitted this transfer
      receiver: '0x0000000000000000000000000000000000000000', // Ethereum address of the user who received this transfer
      token: { // Token info
        type: 'ERC721',  // Type of this asset (ETH/ERC20/ERC721), it used to buy the asset
        data: {
          token_id: '482', // Token ID
          token_address: '0x2d5ac360eaf14d11b442383e06159a3c8afea8ea', // Address of ERC721/ERC20 contract. If the type is ETH, no address is required
          decimals: 0, // Number of decimals supported by this asset
          quantity: '1', // Quantity of this asset - inclusive of fees for buy order in v1 API and exclusive of fees in v3 API
          quantity_with_fees: '' // Quantity of this asset with the sum of all fees applied to the asset
        }
      },
      // Timestamp of the transfer
      timestamp: '2022-09-30T12:36:47.115017Z'
    },
    // Other transfers returned
    ...
  ],
  cursor: 'eyJ0cmFuc2FjdGlvbl9pZCI6NTY3NzUsInN0YXR1cyI6InN1Y2Nlc3MiLCJzZW5kZXJfZXRoZXJfa2V5IjoiMHg1YjQxNjIxOTFkNjA0ZWZlYmViYjQzMDQ5MWQ2NjE1NGRmMWQ1ODU5IiwicmVjZWl2ZXJfZXRoZXJfa2V5IjoiMHhlNGY2M2UxNTUyMTk2OWVkMWY4ODAyMWM0YWZmZTIyNTAzYWQyOTE5IiwiVHlwZSI6IkVSQzcyMSIsIklEIjoiMHhjYjE3ZDMzODBiNjk5ZTFmYTZmZjYxNmU4ZTU0MDhmZTU5ZWFkMWRkMzY0MTBmYjc0YmNjMWRiMzkzMDJiYThiIiwiRVJDNzIxVG9rZW5JRCI6IjI4NzI4IiwiQ29udHJhY3RBZGRyZXNzIjoiMHhhOGVlZGViMmEyMzEwNTQzMGJlOGIxNGFhMWMzN2VkMDI3ZDY3MmRhIiwiRGVjaW1hbHMiOjAsIlF1YW50aXR5IjoiMSIsIkJhdGNoSUQiOm51bGwsImNyZWF0ZWRfYXQiOiIyMDIyLTA5LTMwVDExOjU0OjExLjU4OTMyNloifQ',
  // Remaining results
  remaining: 1
}

  • Kotlin (JVM) Core SDK

📚SDK REFERENCE

  • listTransfers

  • Swift Core SDK

📚SDK REFERENCE

  • listTransfers

  • Golang Core SDK

📚SDK REFERENCE

  • ListTransfers

  • C# Core SDK

📚SDK REFERENCE

  • ListTransfers

Get details about a transfer

  • Typescript Core SDK

📚SDK REFERENCE

  • listTransfers

Request

Get details about a transfer with ID 56779:

const getTransfer = async (id: string) => {
  const response = await client.getTransfer({
    id,
  });
  return response;
};
getTransfer('56775')
  .then((result) => {
    console.log(result);
  })
  .catch((e) => {
    console.log(e);
  });

Example response

{
    transaction_id: 56779, // Sequential transaction ID
    status: 'success', // Status of the transaction
    user: '0xd1a147a26a6f2b414694d2a7161515bdbd97ddbe',       // Ethereum address of the user  who submitted this transfer
    receiver: '0x0000000000000000000000000000000000000000', // Ethereum address of the user who received this transfer
    token: { // Token info
      type: 'ERC721',  // Type of this asset (ETH/ERC20/ERC721), it used to buy the asset
      data: {
        token_id: '482', // Token ID
        token_address: '0x2d5ac360eaf14d11b442383e06159a3c8afea8ea', // Address of ERC721/ERC20 contract. If the type is ETH, no address is required
        decimals: 0, // Number of decimals supported by this asset
        quantity: '1', // Quantity of this asset - inclusive of fees for buy order in v1 API and exclusive of fees in v3 API
        quantity_with_fees: '' // Quantity of this asset with the sum of all fees applied to the asset
      }
    },
    // Timestamp of the transfer
    timestamp: '2022-09-30T12:36:47.115017Z'
}

  • Kotlin (JVM) Core SDK

📚SDK REFERENCE

  • listTransfers

  • Swift Core SDK

📚SDK REFERENCE

  • getTransfer

  • Golang Core SDK

📚SDK REFERENCE

  • GetTransfer

  • C# Core SDK

📚SDK REFERENCE

  • GetTransfer

Last updated