A sync job is an asynchronous background task that imports raw transaction records from a connected provider — an exchange or onchain data source — and normalizes them into a structured, categorized format ready for tax calculation. Raw exchange records and onchain events are mapped into typed transaction types that TaxMaxi uses to compute gains, losses, and income. You must complete a sync before you can run a tax calculation on a source.Documentation Index
Fetch the complete documentation index at: https://docs.taxmaxi.com/llms.txt
Use this file to discover all available pages before exploring further.
Starting a sync
Trigger a sync by posting toPOST /v1/sources/:sourceId/sync. The API responds immediately with a job record — the sync runs in the background.
If a sync is already running for the source, TaxMaxi returns the active job rather than starting a new one. Check the
status field to determine whether the returned job is newly started or already in progress.Job statuses
A sync job moves through the following states:| Status | Meaning |
|---|---|
queued | The job is waiting to be picked up by a worker. |
running | The job is actively fetching and processing records. |
completed | All records have been imported and normalized successfully. |
failed | The job encountered an unrecoverable error. Check message for details. |
Polling for completion
Jobs are asynchronous. PollGET /v1/sources/:sourceId/jobs/:jobId until the status is completed or failed.
Record counters
The completed job response includes three counters that describe what happened during processing.| Field | Meaning |
|---|---|
importedRecords | Total raw records fetched from the provider. |
normalizedRecords | Records that were successfully mapped to internal transaction types. |
failedRecords | Records that could not be normalized. These are skipped, not retried. |
Replay
Replay re-runs normalization against the raw records already cached from the last sync, without re-fetching data from the provider. Use it when normalization logic has changed and you want updated results without issuing new API calls to the exchange.SourceSyncStartResponse shape as a regular sync. Poll the job the same way.
From the CLI:
When to use replay vs. sync
When to use replay vs. sync
Use sync when you want to fetch the latest transactions from the exchange — for example, at the start of a new tax year or after new activity has occurred.Use replay when the raw data is already up to date but normalization rules have changed, or when you want to rebuild derived data after a schema update. Replay is faster than a full sync because it skips the provider fetch step entirely.
What happens after a successful sync
Once a job reachescompleted status, the source is ready for tax calculation. The normalized transaction records are stored and used as the input to POST /v1/sources/:sourceId/tax. See Tax calculation for details.