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: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. PollgetSyncJob until the status field reaches a terminal value:
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 — usereplaySync. 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:TaxCalculation object:
Germany (
"germany") is the first supported jurisdiction. Tax figures use FIFO-based capital gains calculation aligned with current German tax law.