Classify one transaction
classify_transactionClassify a blockchain transaction by hash or contract call to get tax category, treatment, taxable status, confidence, and review flags for US crypto tax reporting. Supports EVM chains and Solana.
Instructions
Classify 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 (swap / transfer / stake / lend / bridge / etc.), treatment (disposal / income / non_taxable / expense / needs_review), taxable, confidence, needs_review, plus a natural-language description. 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 |
|---|---|---|---|
| taxable | No | null when needs_review | |
| category | Yes | Canonical category (closed enum, see https://cryptotaxedge.com/taxonomy) | |
| protocol | No | ||
| treatment | Yes | ||
| confidence | Yes | ||
| explanation | No | ||
| needs_review | Yes |