Skip to main content
Octav automatically categorizes all blockchain transactions into specific types, making it easy to filter, analyze, and understand on-chain activity.
Smart Categorization - Transactions are analyzed and categorized automatically based on method signatures, protocols, and transfer patterns

Transaction Type Enum

export enum TransactionType {
  ADDLIQUIDITY = "ADDLIQUIDITY",
  AIRDROP = "AIRDROP",
  APPROVAL = "APPROVAL",
  BORROW = "BORROW",
  BRIDGEIN = "BRIDGEIN",
  BRIDGEOUT = "BRIDGEOUT",
  CLAIM = "CLAIM",
  COLLECT = "COLLECT",
  CLOSEVAULT = "CLOSEVAULT",
  DEPOSIT = "DEPOSIT",
  DONATION = "DONATION",
  EXPENSE = "EXPENSE",
  FAILED = "FAILED",
  FOLLOW = "FOLLOW",
  IGNORE = "IGNORE",
  INTERACTION = "INTERACTION",
  LEND = "LEND",
  MINT = "MINT",
  MULTITYPE = "MULTITYPE",
  OPENVAULT = "OPENVAULT",
  REPAYVAULT = "REPAYVAULT",
  REMOVELIQUIDITY = "REMOVELIQUIDITY",
  SIGN = "SIGN",
  SELFTRANSFER = "SELFTRANSFER",
  SPAM = "SPAM",
  STAKE = "STAKE",
  SWAP = "SWAP",
  TRANSFERIN = "TRANSFERIN",
  TRANSFEROUT = "TRANSFEROUT",
  UNDEFINED = "UNDEFINED",
  UNSTAKE = "UNSTAKE",
  UNWRAP = "UNWRAP",
  VOTE = "VOTE",
  WITHDRAW = "WITHDRAW",
  WRAP = "WRAP"
}

Transaction Categories

  • Transfers
  • DeFi Actions
  • Special Actions
  • Advanced
  • Meta Types
Receiving tokens from another address
  • Incoming token transfers
  • Received payments
  • Peer-to-peer receipts
Example: Receiving USDC from a friend
Sending tokens to another address
  • Outgoing token transfers
  • Payments sent
  • Peer-to-peer sends
Example: Sending ETH to another wallet
Moving tokens between your own wallets
  • Transfers between addresses you control
  • Portfolio rebalancing
  • Moving funds to cold storage
Example: Moving USDT from hot wallet to hardware wallet
Receiving assets from another blockchain
  • Cross-chain bridge receipts
  • Assets arriving from L1 to L2
  • Multi-chain transfers
Example: Bridging USDC from Ethereum to Arbitrum
Sending assets to another blockchain
  • Cross-chain bridge sends
  • Moving assets from L2 to L1
  • Multi-chain transfers
Example: Bridging ETH from Base to Ethereum

Using Transaction Types

// Get only swaps
const response = await fetch(
  `https://api.octav.fi/v1/transactions?addresses=${address}&txTypes=SWAP`,
  {
    headers: { 'Authorization': `Bearer ${apiKey}` }
  }
);

const transactions = await response.json();
console.log(`Found ${transactions.length} swaps`);

Common Patterns

  • DeFi Activity
  • Portfolio Changes
  • Exclude Spam
// Get all DeFi-related transactions
const DEFI_TYPES = [
  'SWAP', 'ADDLIQUIDITY', 'REMOVELIQUIDITY',
  'STAKE', 'UNSTAKE', 'LEND', 'BORROW',
  'DEPOSIT', 'WITHDRAW', 'CLAIM'
];

const response = await fetch(
  `https://api.octav.fi/v1/transactions?addresses=${address}&txTypes=${DEFI_TYPES.join(',')}`,
  {
    headers: { 'Authorization': `Bearer ${apiKey}` }
  }
);

Best Practices

Filter on the API side for better performance:
// Good - Filter on API
const swaps = await fetch(
  `https://api.octav.fi/v1/transactions?addresses=${address}&txTypes=SWAP`
);

// Less efficient - Filter client-side
const all = await fetch(
  `https://api.octav.fi/v1/transactions?addresses=${address}`
);
const swaps = all.filter(tx => tx.txType === 'SWAP');
MULTITYPE transactions may need special handling:
if (tx.txType === 'MULTITYPE') {
  // Transaction has multiple aspects
  // Check other fields for details
  console.log('Complex transaction:', tx);
}
Convert type enums to readable labels:
const TYPE_LABELS = {
  'TRANSFERIN': 'Received',
  'TRANSFEROUT': 'Sent',
  'SWAP': 'Swapped',
  'ADDLIQUIDITY': 'Added Liquidity',
  'REMOVELIQUIDITY': 'Removed Liquidity',
  // ... etc
};

function getTypeLabel(txType) {
  return TYPE_LABELS[txType] || txType;
}