COMMAND
Export transaction history (CSV / JSON)
glnc history exports a wallet's transaction history as CSV or JSON. It classifies each row (transfer, swap, contract call), backfills USD prices at the time of the transaction where possible, and writes a tax-ready file. Uses the unified Etherscan V2 endpoint; works without an API key at a lower rate limit.
Synopsis
glnc history <address> [--out <path|auto>] [--from <date>] [--to <date>] [--chain <name>] [--json]Example
glnc history 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --out autoCSV columns
Columns are stable so spreadsheets and accounting tools can map them once and forget.
| Flag | Description |
|---|---|
timestamp | UTC ISO-8601 timestamp of the block the tx was included in. |
chain | Chain slug (ethereum, polygon, arbitrum, base, ...). |
hash | Transaction hash. |
kind | Classifier output: transfer, swap, contract-call, approval, mint, burn, ... |
from | Sender address. |
to | Recipient or contract address. |
symbol / amount | Token symbol and signed amount from the row owner's perspective. |
priceUsd / valueUsd | Historical USD price at block time, and the USD value of the amount. |
gasNative / gasUsd | Gas paid by the sender, in native and USD. |
API keys
The public Etherscan V2 endpoint works without a key, with a lower rate limit. For anything beyond a few hundred transactions, set GLNC_ETHERSCAN_KEY once in your shell to lift the limit. The free Etherscan tier is more than enough for personal exports.
export GLNC_ETHERSCAN_KEY=YourKeyHere && glnc history 0x...Flags
| Flag | Description |
|---|---|
--out <path|auto> | Write to a path; "auto" writes to ./glnc-<address>.csv. Omit for stdout. |
--from <date> / --to <date> | Filter to a date range. Inclusive. Accepts YYYY-MM-DD. |
--chain <name> | Restrict to a single chain instead of unioning across supported chains. |
--no-prices | Skip the historical USD backfill. Significantly faster. |
--api-key <key> | Override the GLNC_ETHERSCAN_KEY env var with an inline key. |
--json | Emit the glnc.history/v1 envelope on stdout instead of writing a CSV. |
--cost-basis <fifo|none> | New in v1.1.0. Compute FIFO cost basis, proceeds, realized gain, and holding period. Default "none". |
--own-wallets <a,b,c> | New in v1.1.0. EVM addresses you also control; transfers between them are not treated as disposals. |
Cost basis & taxes
v1.1.0 adds --cost-basis fifo, which annotates each disposal with five new columns at the end of the CSV: cost_basis_usd, proceeds_usd, realized_gain_usd, holding_period(short/long/mixed), and income_usd (a hint for potential Schedule 1 ordinary income). Pair with --own-wallets so transfers between addresses you control are not treated as taxable disposals.
glnc is MIT-licensed AS-IS software; it does not constitute tax, legal, or accounting advice. See the taxes documentation for the full handling spec, worked examples, known limitations, and the disclaimer in full.
Sources
- Etherscan API documentation (opens in new tab): unified V2 transaction endpoint
- CoinGecko API (opens in new tab): historical USD pricing