Workflow: Record Synchronization
Why this exists
Imported exchange/blockchain records and user transactions can diverge over time. Synchronization reconciles external records with Glacez transactions.
Two distinct flows
A) Record import (data ingestion)
Import fetches raw records from exchange or wallet sources.
Typical entry points:
- Credential record import endpoint
- Wallet record import endpoint
- File upload import endpoint
These operations publish jobs to glacez.records.queue and worker processes by type (CREDENTIAL, WALLET, FILE).
B) Synchronization (reconciliation)
Synchronization compares records and transactions, then applies reconciliation updates.
Core endpoints:
/jobs/synchronize/all/jobs/synchronize/credentials/{credentialId}/jobs/synchronize/wallets/{walletId}
Guardrails:
- Credential/wallet in
IMPORTINGstate cannot be synchronized directly - Bulk sync only picks connexions eligible for auto-sync
Reconciliation outcomes (high level)
Synchronization can:
- Add missing orders/transfers
- Update existing closed/limit orders and transfers
- Convert limit orders when execution status changed
- Mark missing stale limit orders as canceled (with safeguards)
- Add or remove auto-generated balancing transactions when needed
User-visible results
- Transaction tracks are created for auditability
- Status events are emitted so users can see what changed
- Portfolio/position calculations incorporate corrected data
Related: