Skip to main content
Syncing a source fetches raw transaction records from the blockchain provider and normalizes them into a structured, categorized format ready for tax calculation. You start a sync by calling POST /v1/sources/:sourceId/sync, which immediately returns a job object. Because syncs run asynchronously, you then poll GET /v1/sources/:sourceId/jobs/:jobId every few seconds until the status reaches completed or failed. If you want to reprocess existing cached records without re-fetching from the provider — for example, after an update to the normalization logic — use POST /v1/sources/:sourceId/replay instead. Required header for all sync endpoints: Authorization: Bearer <token>

Sync lifecycle

A sync job moves through the following states: If a sync is already running for a source when you call POST /v1/sources/:sourceId/sync, the API returns the active job rather than starting a duplicate.

Start a sync

Starts a new sync job for the specified source. If an active job already exists, returns that job.

Path parameters

string
required
The ID of the source to sync.

Response fields

string
required
ID of the source being synced.
string
required
Unique identifier for the sync job. Use this to poll status.
string
required
Current job status: queued, running, completed, or failed.
string | null
required
Optional status message. Contains error details when status is failed.

Errors


Replay normalization

Resets derived data for a source and rebuilds it from cached raw records without re-fetching from the blockchain provider. Use replay when you want to apply updated normalization logic to already-imported data.

Path parameters

string
required
The ID of the source to replay.

Response fields

Same as start a sync: sourceId, jobId, status, message.

Errors


Poll job status

Returns the current status of a sync or replay job, including record counters once the job has made progress.

Path parameters

string
required
The ID of the source.
string
required
The ID of the job returned when you started the sync or replay.

Response fields

string
required
ID of the source being synced.
string
required
ID of the job.
string
required
Current job status: queued, running, completed, or failed.
number | null
required
Total raw records fetched from the provider. null while the job is queued.
number | null
required
Number of records successfully normalized. null while the job is queued.
number | null
required
Number of records that could not be normalized. null while the job is queued.
string | null
required
Optional status message. Contains error details when status is failed.

Polling pattern

Poll the status endpoint every 2–5 seconds until status is completed or failed. Once completed, you can proceed to calculate tax.
If status is failed, read message for the reason and retry with a fresh sync if appropriate.

Errors


Full example: start, poll, and confirm

The following example walks through a complete sync: start the job, poll until done, then verify the record counts.
Start sync response
Poll response (running)
Poll response (completed)