Classify one transaction
classify_transactionClassify a single blockchain transaction using CryptoTaxEdge's multi-source consensus engine, the same engine and serve semantics as the public REST /v1/classify endpoint. Returns the /v1 contract fields: category (the open vocabulary the engine emits, for example swap, transfer, staking, reward, airdrop, income_receipt, fee_payment, borrow, repay, collateral_supply, collateral_withdraw, liquidity_add, liquidity_remove, wrap, unwrap, liquid_staking_mint, bridge_transfer, nft_mint, spam, unclassified; the full set with house treatments is at https://cryptotaxedge.com/standard/#categories and grows additively, so branch exhaustive logic on treatment, never on category), treatment (closed enum: disposal, income, non_taxable, expense, needs_review; needs_review means no treatment is asserted and taxable is null), taxable, confidence, needs_review, ledger_action, protocol, description (plain-English reasoning, also returned as explanation for existing clients) and, on hash lookups, assets (sent, received, gas). Works for EVM chains and Solana. Provide tx_hash (chain optional, auto-detected), or contract_address + function_selector + chain for a rule-library tuple lookup.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Chain slug (e.g. "ethereum", "polygon", "bsc", "arbitrum", "base", "optimism", "avalanche", "solana"). Optional for tx_hash lookups; the engine auto-detects the chain. REQUIRED for contract_address lookups. | |
| tx_hash | No | Transaction hash (0x-prefixed 66-char for EVM, base-58 for Solana). Either tx_hash OR contract_address is required. | |
| contract_address | No | (Optional) 0x-prefixed contract address the transaction called. With function_selector + chain, performs a rule-library tuple lookup. | |
| function_selector | No | (Optional) 0x-prefixed 4-byte function selector (first 4 bytes of tx input data). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assets | No | Net asset movements, same shape as REST /v1: sent and received legs plus the gas leg (null when not attributable). Present when the engine response carries them. | |
| taxable | No | null when needs_review | |
| category | Yes | Canonical category. Open vocabulary that only grows additively; tolerate unfamiliar values and branch exhaustive logic on treatment instead. Full set with house treatments: https://cryptotaxedge.com/standard/#categories | |
| protocol | No | ||
| treatment | Yes | Closed five-value tax treatment enum, safe to switch on exhaustively. needs_review means no treatment is asserted. | |
| confidence | Yes | ||
| description | No | Plain-English reasoning for the verdict, same field as REST /v1. | |
| explanation | No | Deprecated alias of description, kept for existing clients. | |
| needs_review | Yes | ||
| ledger_action | No | Suggested ledger label for posting, same field as REST /v1. |