Skip to main content
A source represents a connected exchange account or onchain wallet. The client.sources resource exposes methods to list your sources, trigger and monitor sync jobs that import transactions, and compute a tax summary once a sync is complete. All methods return Promises and throw TaxMaxiError on failure — see Error handling for details.

List sources

Retrieve all sources connected to the authenticated account:
The response is a SourceList object with a sources array. Each element is a Source describing a single connected account.

Start a sync job

Trigger a new sync job for a source. The sync imports raw transactions from the provider and normalizes them into TaxMaxi’s internal format:
startSync returns a SourceSyncStart object containing the jobId you use to poll for status.

Poll sync job status

Sync jobs run asynchronously. Poll getSyncJob until the status field reaches a terminal value:
The status field follows this lifecycle: A SourceSyncJob response contains:

Replay a sync

To rebuild normalized data from the raw records already cached from the last sync — without re-fetching from the exchange — use replaySync. This is useful when normalization logic has been updated and you want the latest results applied to your existing data. The parameters and return type are identical to startSync:
Replay does not contact the exchange provider. It only reprocesses the raw records cached during the most recent sync. To fetch new activity from the provider, use startSync instead.

Calculate tax

Once a sync has completed, compute the tax summary for a given year and jurisdiction:
The response is a TaxCalculation object:
Germany ("germany") is the first supported jurisdiction. Tax figures use FIFO-based capital gains calculation aligned with current German tax law.

Complete example: list → sync → poll → calculate

The following example puts all the pieces together: it picks the first available source, starts a sync, polls until the job finishes, then prints the tax summary.