Query & edit transactions
Find the exact ledger activity you need, inspect every transfer, and make safe, auditable edits.
List and filter transactions
getClientTransactions is the main ledger query. Pagination is zero-based and limit is capped at 500. Start with a narrow date range, then add account, asset, label, review, or missing-basis filters.
query Transactions($clientId: ID!) {getClientTransactions(clientId: $clientIdstartDate: "2025-01-01"endDate: "2025-12-31"reviewed: falselimit: 25page: 0sortBy: "date"ascending: false) {totaltransactions { id title createdAt provider capGainsSum incomeSum }}}
Inspect one transaction
Read the transaction and its transfer legs before editing. Transfer value is the token quantity; fiatAmountCents and basis are monetary fields.
query Transaction($clientId: ID!, $transactionId: ID!) {getTransaction(clientId: $clientId, transactionId: $transactionId) {id title createdAt provider txnHash labelUsed notescapGainsSum incomeSum isMissingBasistransfers {id value fiatAmountCents basis isMissingBasistransferCategory fromAccountId toAccountIdfullAsset { symbol name }}}}
Label transactions in bulk
Fetch valid labels with getLabels first. Mutations require a ReadWrite API key.
mutation LabelTransactions($clientId: ID!, $transactionIds: [ID!]!) {labelTransactions(clientId: $clientIdtransactionIds: $transactionIdslabel: "v1:swap") { id labelUsed }}
Edit a transaction
Use updateTransaction for titles, notes, labels, visibility, dates, and supported overrides. Set createDefaultRule only when the same correction should apply to similar future activity.
Labels, transfer changes, merges, and splits can change downstream tax results. Trigger one recalculation after your batch of edits, then verify the affected transactions.
mutation UpdateTransaction($clientId: ID!, $transactionId: ID!) {updateTransaction(clientId: $clientIdtransactionId: $transactionIdcreateDefaultRule: falseupdates: { notes: "Reviewed via API", overrideLabel: false }) { transaction { id notes } }}
Split one transaction into many
Use splitTransactionIntoMany for all new splits, including one-to-two splits. The base keeps transfers omitted from splits, each input entry creates one child, and array order is the economic settlement order. The legacy splitTransaction mutation is deprecated and retained for compatibility.
Children are created atomically in the order supplied. Wait for recalculation before validating gains or missing basis.
mutation SplitIntoMany($clientId: ID!, $transactionId: ID!) {splitTransactionIntoMany(clientId: $clientIdbaseTransactionId: $transactionIdsplits: [{ transferIds: ["transfer-acquisition"] }{ transferIds: ["transfer-swap"] }{ transferIds: ["transfer-bridge"] }]) { id createdAt isSplitTxn }}
More edit operations
| Task | Operation |
|---|---|
Change a transfer value or basis | updateTransfer |
Merge related activity | mergeTransactions |
Split a transaction | splitTransactionIntoMany |
Link owned-wallet movement | markInternalTransfer |
Hide or unhide activity | hideTransaction / hideMultipleTransactions |
Review edit history | getClientAuditLogs |