Overview
The Rithmic integration enables automatic synchronization of trades from your Rithmic trading platform into Deltalytix for analysis and reporting.Features
- Real-time trade synchronization
- Multiple account support
- Automatic sync scheduling
- Order and performance data processing
- Secure credential storage
Setup Instructions
Step 1: Configure Synchronization
Create a synchronization configuration for your Rithmic account:app/[locale]/dashboard/components/import/rithmic/sync/actions.ts:15-38
Step 2: Verify Configuration
Check your synchronization settings:app/[locale]/dashboard/components/import/rithmic/sync/actions.ts:6-13
Step 3: Start Syncing
Once configured, trades will be automatically synchronized based on your sync schedule. The integration processes:- Order executions
- Fill data
- Performance metrics
- Account information
API Reference
GET /api/rithmic/synchronizations
Retrieve all Rithmic synchronization configurations for the current user. Response:app/api/rithmic/synchronizations/route.ts:9-26
POST /api/rithmic/synchronizations
Create or update a Rithmic synchronization configuration. Request Body:app/api/rithmic/synchronizations/route.ts:28-51
DELETE /api/rithmic/synchronizations
Remove a Rithmic synchronization configuration. Request Body:app/api/rithmic/synchronizations/route.ts:53-84
Synchronization Flow
Database Schema
Rithmic synchronization data is stored in theSynchronization table:
Upsert Logic
Configurations are upserted using a composite unique key:app/[locale]/dashboard/components/import/rithmic/sync/actions.ts:18-37
Components
The Rithmic integration includes several UI components:Synchronization Components
| Component | Purpose | Location |
|---|---|---|
rithmic-sync-connection.tsx | Manage connection settings | app/[locale]/dashboard/components/import/rithmic/sync/ |
rithmic-sync-progress.tsx | Display sync progress | app/[locale]/dashboard/components/import/rithmic/sync/ |
rithmic-credentials-manager.tsx | Handle credential input | app/[locale]/dashboard/components/import/rithmic/sync/ |
rithmic-notifications.tsx | Show sync notifications | app/[locale]/dashboard/components/import/rithmic/sync/ |
sync-countdown.tsx | Next sync countdown timer | app/[locale]/dashboard/components/import/rithmic/sync/ |
Data Processing Components
| Component | Purpose | Location |
|---|---|---|
rithmic-order-processor-new.tsx | Process order data | app/[locale]/dashboard/components/import/rithmic/ |
rithmic-performance-processor.tsx | Calculate performance metrics | app/[locale]/dashboard/components/import/rithmic/ |
Error Handling
Common Errors
User Not Authenticated
User Not Authenticated
Error:
User not authenticatedCause: The user’s session has expired or is invalidSolution:Account ID Required
Account ID Required
Error:
accountId is requiredCause: Missing accountId in request bodySolution:Failed to Update Synchronization
Failed to Update Synchronization
Error:
Failed to update synchronizationCause: Database constraint violation or network errorSolution:- Verify the
accountIdformat is correct - Check database connectivity
- Ensure unique constraints are not violated
Security Considerations
Credential Storage
While theSynchronization table has a token field, Rithmic credentials should be handled according to your security requirements:
User Isolation
All operations are scoped to the authenticated user:app/[locale]/dashboard/components/import/rithmic/sync/actions.ts:6-13
Best Practices
Regular Syncs
Schedule synchronization to run automatically at regular intervals
Error Monitoring
Implement logging and alerting for sync failures
Data Validation
Validate trade data before saving to database
Connection Testing
Test Rithmic connection before enabling automatic sync
Troubleshooting
Sync Not Running
- Check if synchronization is configured:
- Verify
lastSyncedAttimestamp:
- Check for errors in server logs
No Trades Appearing
- Ensure Rithmic account has completed trades
- Verify account ID matches your Rithmic account
- Check if order processor is running
- Review performance processor for data transformation errors
Next Steps
View Synchronizations
Manage your Rithmic connections
Monitor Performance
Analyze your synchronized trades