Transactions

SwitchWallet Enable you to get a paginated data of all your transactions (Deposit and Withdrawals) with Endless Options(filters), Thereby allowing you to filter out a particular or list of transaction with our optional parameter below

Parameters

Parameter
Status
Description

Status

Enum

Optional

Enum {Successful=1, Failed=2}

TransactionHash

string

Optional

Hash of a transaction

WalletAddress

string

Optional

Address involved in the transaction

TransactionType

Enum

Optional

Enum {Deposit=1, Withdrawal=2}

Page

number

Optional

Page No, Defaults to 1

PageSize

number

Optional

PageSize, Defaults to 30 per page

StartTimeStamp

number

Optional

Starting date in timestamp format

EndTimeStamp

number

Optional

Ending date in timestamp format

Getting all transaction

GET Baseurl/api/v2/analytics/transaction-record

Without the above parameters

{
    "data": {
    "records": [
      {
        "transactionStatus": "SUCCESSFUL",
        "transactionType": "Deposit",
        "transactionHash": "0x82f560dbaff596e451828af86571eb0cd3e52c0f291810f07ea72189db4a8722",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0x82f560dbaff596e451828af86571eb0cd3e52c0f291810f07ea72189db4a8722",
        "toAddress": "0x4769FB8cBb51535533a485fD91d1649a688af192",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0x4769FB8cBb51535533a485fD91d1649a688af192",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 20,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-613b528697ea52d266d73ed3",
        "createdAt": "2021-09-10T12:41:45.4537541"
      },
      {
        "transactionStatus": "SUCCESSFUL",
        "transactionType": "Deposit",
        "transactionHash": "0xe568b0e0a9f7565140c946c7aee637984515079196a3fddfc1aab66aa802ed5b",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0xe568b0e0a9f7565140c946c7aee637984515079196a3fddfc1aab66aa802ed5b",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 1.23,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c6312678ea10462bec80",
        "createdAt": "2021-09-20T17:34:43.6280348"
      },
      {
        "transactionStatus": "FAILED",
        "transactionType": "Withdrawal",
        "transactionHash": "0xb1c183590f0782fd5d64f5c848421c1d7ce8948ae074511851cd1ebef74e1557",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0xb1c183590f0782fd5d64f5c848421c1d7ce8948ae074511851cd1ebef74e1557",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 1.32,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c65b2678ea10462bfd0a",
        "createdAt": "2021-09-20T17:35:24.8637116"
      },
      {
        "transactionStatus": "FAILED",
        "transactionType": "Withdrawal",
        "transactionHash": "0x5fb75f8680a2f05bb7dc910976007a91cb6e39ff52268295544653401f8f0174",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0x5fb75f8680a2f05bb7dc910976007a91cb6e39ff52268295544653401f8f0174",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 5.1,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c7df2678ea10462c95de",
        "createdAt": "2021-09-20T17:41:52.6894277"
      } ],
    "pageSize": 30,
    "currentPage": 1,
    "totalPages": 2,
    "totalRecords": 40
  },
  "isSuccessful": true,
  "message": null,
  "httpStatusCode": 200,
}

In the above Api call response are

    "pageSize": 30,
    "currentPage": 1,
    "totalPages": 2,
    "totalRecords": 40

This simply means merchant only 40 transactions in our system, Since PageSize parameter wasn't added, it defaults to return just 30 data in a single page arrange by date(most recent to recent) which is good for merchant's client side to load faster.

This Also means that remaining 10 data await you in page 2, To get it, Add page parameter and set it to "2"

With Page = 2

GET Baseurl/api/v2/analytics/transaction-record

Query Parameters

Name
Type
Description

page

number

2

{
    "data": {
    "records": [
      {
        "transactionStatus": "SUCCESSFUL",
        "transactionType": "Deposit",
        "transactionHash": "0x82f560dbaff596e451828af86571eb0cd3e52c0f291810f07ea72189db4a8722",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0x82f560dbaff596e451828af86571eb0cd3e52c0f291810f07ea72189db4a8722",
        "toAddress": "0x4769FB8cBb51535533a485fD91d1649a688af192",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0x4769FB8cBb51535533a485fD91d1649a688af192",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 20,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-613b528697ea52d266d73ed3",
        "createdAt": "2021-09-10T12:41:45.4537541"
      },
      {
        "transactionStatus": "SUCCESSFUL",
        "transactionType": "Deposit",
        "transactionHash": "0xe568b0e0a9f7565140c946c7aee637984515079196a3fddfc1aab66aa802ed5b",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0xe568b0e0a9f7565140c946c7aee637984515079196a3fddfc1aab66aa802ed5b",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 1.23,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c6312678ea10462bec80",
        "createdAt": "2021-09-20T17:34:43.6280348"
      },
      {
        "transactionStatus": "FAILED",
        "transactionType": "Withdrawal",
        "transactionHash": "0xb1c183590f0782fd5d64f5c848421c1d7ce8948ae074511851cd1ebef74e1557",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0xb1c183590f0782fd5d64f5c848421c1d7ce8948ae074511851cd1ebef74e1557",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 1.32,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c65b2678ea10462bfd0a",
        "createdAt": "2021-09-20T17:35:24.8637116"
      },
      {
        "transactionStatus": "FAILED",
        "transactionType": "Withdrawal",
        "transactionHash": "0x5fb75f8680a2f05bb7dc910976007a91cb6e39ff52268295544653401f8f0174",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0x5fb75f8680a2f05bb7dc910976007a91cb6e39ff52268295544653401f8f0174",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 5.1,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c7df2678ea10462c95de",
        "createdAt": "2021-09-20T17:41:52.6894277"
      } ],
    "pageSize": 30,
    "currentPage": 2,
    "totalPages": 2,
    "totalRecords": 40
  },
  "isSuccessful": true,
  "message": null,
  "httpStatusCode": 200,
}

Increase PageSize to "50", This means the whole data(40) plus even 10 more(if there is) can fit into this one page

With PageSize = 50

GET Baseurl/api/v2/analytics/transaction-record

Query Parameters

Name
Type
Description

pageSize

number

2

{
    "data": {
    "records": [
      {
        "transactionStatus": "SUCCESSFUL",
        "transactionType": "Deposit",
        "transactionHash": "0x82f560dbaff596e451828af86571eb0cd3e52c0f291810f07ea72189db4a8722",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0x82f560dbaff596e451828af86571eb0cd3e52c0f291810f07ea72189db4a8722",
        "toAddress": "0x4769FB8cBb51535533a485fD91d1649a688af192",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0x4769FB8cBb51535533a485fD91d1649a688af192",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 20,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-613b528697ea52d266d73ed3",
        "createdAt": "2021-09-10T12:41:45.4537541"
      },
      {
        "transactionStatus": "SUCCESSFUL",
        "transactionType": "Deposit",
        "transactionHash": "0xe568b0e0a9f7565140c946c7aee637984515079196a3fddfc1aab66aa802ed5b",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0xe568b0e0a9f7565140c946c7aee637984515079196a3fddfc1aab66aa802ed5b",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 1.23,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c6312678ea10462bec80",
        "createdAt": "2021-09-20T17:34:43.6280348"
      },
      {
        "transactionStatus": "FAILED",
        "transactionType": "Withdrawal",
        "transactionHash": "0xb1c183590f0782fd5d64f5c848421c1d7ce8948ae074511851cd1ebef74e1557",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0xb1c183590f0782fd5d64f5c848421c1d7ce8948ae074511851cd1ebef74e1557",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 1.32,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c65b2678ea10462bfd0a",
        "createdAt": "2021-09-20T17:35:24.8637116"
      },
      {
        "transactionStatus": "FAILED",
        "transactionType": "Withdrawal",
        "transactionHash": "0x5fb75f8680a2f05bb7dc910976007a91cb6e39ff52268295544653401f8f0174",
        "transactionHashUrl": "https://testnet.bscscan.com/tx/0x5fb75f8680a2f05bb7dc910976007a91cb6e39ff52268295544653401f8f0174",
        "toAddress": "0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddress": "0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "toAddressUrl": "https://testnet.bscscan.com/address/0xfa2720e1B11Ff8ec945e2DfDC2FbFC8Ebb5F7fEB",
        "fromAddressUrl": "https://testnet.bscscan.com/address/0xc38ee0Df48303D1D271d8922E5ce7FcF36BD281b",
        "amount": 5.1,
        "network": "BSC",
        "currency": "BUSD",
        "transactionTimeStamp": 0,
        "reference": "XF-WREF-6148c7df2678ea10462c95de",
        "createdAt": "2021-09-20T17:41:52.6894277"
      } ],
    "pageSize": 50,
    "currentPage": 1,
    "totalPages": 1,
    "totalRecords": 40
  },
  "isSuccessful": true,
  "message": null,
  "httpStatusCode": 200,
}

To get all transaction in a particular Network eg "BSC" network,

Solution: Call same Endpoint with NetworkChain parameter with value "1"

Problem
Solution
parameter Value

To get all failed transactions

Call same Endpoint with Status=2

2

Get the transaction a particular hash

Call same Endpoint with TransactionHash= your hash

your hash

To get all transactions tied to WalletAddress

Call same Endpoint with WalletAddress= yourWalletAddress

yourWalletAddress

To get only Deposit transactions

Call same Endpoint with TransactionType= 1

1

To get all transactions between date "A" to date "B"

Call same Endpoint with date "A" coverted to TimeStamp as StartTimeStamp and date "B" coverted to TimeStamp as EndTimeStamp

StartTimeStamp=45657379, EndTimeStamp= 88759578

the above solution work for each Enum value in the Pararmeter Table

Last updated