How to calculate the side of transaction i.e. DEBIT/CREDIT

I am using transaction history API (GET /transactions) to fetch all the transactions. I have the following questions based on the API response -

  1. How to calculate whether the transaction is DEBIT or CREDIT based on the source and destination?
  2. Can you help me understand this doc - Transaction Sources & Destinations ? Do we need to handle each type (source/destination) separately to calculate the side of the transaction or is there any generic way to do that?

Here is one example -
In the below screenshot, I can see both source and destination have the type ‘VAULT_ACCOUNT’. How I can conclude this particular transaction is DEBIT/CREDIT?

Hello, yes you can use the destination object to detect incoming transactions (credits), by filtering transactions where destination>type = VAULT_ACCOUNT.
Where both source and destination are vault accounts, you have a internal transfer. Hope this helps, let us know what further questions you have.

Thanks for the response !!

What is the difference between BASECHAIN_ETH and ETH assteIds? Are both of them different assetIds/tokens or can both be considered as one token?

I exported my transaction history CSV from the Fireblocks portal and I can see 2 columns (‘Asset’ and “Asset Symbol”). May I know what is the difference between both of them? Also, I am not getting the ‘Asset Symbol’ fields in the transaction history API (GET /transactions) response.

Any update on this ?

The asset symbol is the display symbol used on the Fireblocks Console. Since the gas asset of the Base network is just “ETH”, that is what the display symbol is.