Short Answer
Yes. VaultCharts supports advanced API configurations that allow you to connect to any REST API, use custom authentication, define custom parsing logic, and normalize data to OHLCV format. This makes VaultCharts suitable for quantitative research, institutional workflows, and proprietary data sources.
Detailed Explanation
Why Custom APIs Matter
While templates cover popular providers, custom APIs enable:
- Proprietary data sources: Your own research data or institutional feeds
- Specialized providers: Niche data sources not covered by templates
- Custom requirements: Specific data formats or authentication methods
- Enterprise integration: Connect to internal systems and databases
- Advanced use cases: Quantitative research and backtesting
What You Can Configure
1. API Endpoint
Configure:
- Base URL
- Endpoint paths
- Query parameters
- Path parameters
- Dynamic URL construction
2. Authentication
Support for:
- API Keys: Header-based or query parameter
- Bearer Tokens: OAuth 2.0 and similar
- Basic Auth: Username/password
- Custom Headers: Any authentication method
- Token Refresh: Automatic token renewal
3. Request Configuration
Set up:
- HTTP method (GET, POST, etc.)
- Request headers
- Query parameters
- Request body (for POST)
- Timeout settings
4. Data Parsing
Define:
- Response format (JSON, CSV, XML)
- Data extraction logic
- Field mapping to OHLCV
- Timezone handling
- Data validation
5. Pagination
Handle:
- Cursor-based pagination
- Offset/limit pagination
- Page-based pagination
- Custom pagination logic
6. Rate Limiting
Configure:
- Request rate limits
- Retry logic
- Backoff strategies
- Error handling
Step-by-Step Setup
Step 1: Create Dataflow
- Open data import dialog
- Select "Custom API"
- Choose "Create New Dataflow"
- Name your dataflow
Step 2: Configure Endpoint
- Enter base URL
- Set endpoint path
- Configure query parameters
- Test endpoint connection
Step 3: Set Authentication
- Choose authentication type
- Enter credentials
- Configure token refresh (if needed)
- Test authentication
Step 4: Define Parsing
- Specify response format
- Map fields to OHLCV
- Configure timestamp parsing
- Set timezone
Step 5: Configure Symbol Format
- Define symbol format
- Set symbol parameter name
- Configure symbol transformation
- Test with sample symbol
Step 6: Set Timeframe
- Define timeframe parameter
- Map to provider format
- Configure timeframe conversion
- Test different timeframes
Step 7: Test and Save
- Test with sample symbol
- Verify data format
- Check data accuracy
- Save configuration
Common Use Cases
1. Proprietary Data Sources
Connect to:
- Internal databases
- Research datasets
- Proprietary feeds
- Custom data warehouses
2. Specialized Providers
Integrate:
- Niche data providers
- Regional exchanges
- Alternative data sources
- Custom market data
3. Quantitative Research
Use for:
- Backtesting with historical data
- Strategy development
- Research analysis
- Data validation
4. Institutional Workflows
Enterprise features:
- Internal system integration
- Secure data access
- Custom authentication
- Compliance requirements
Data Format Requirements
OHLCV Format
Your API should return data in OHLCV format:
{
"timestamp": 1234567890,
"open": 50000.00,
"high": 51000.00,
"low": 49000.00,
"close": 50500.00,
"volume": 1234.56
}
Supported Formats
- JSON: Most common, flexible
- CSV: Simple, efficient
- XML: Less common, supported
- Custom: Define parsing logic
Timestamp Handling
VaultCharts supports:
- Unix timestamps (seconds or milliseconds)
- ISO 8601 format
- Custom date formats
- Timezone conversion
Advanced Configuration
Custom Headers
Add custom headers for:
- Authentication tokens
- API versioning
- Custom metadata
- Provider-specific requirements
Query Parameters
Configure:
- Symbol parameter
- Timeframe parameter
- Date range parameters
- Custom filters
Error Handling
Set up:
- Retry logic
- Error messages
- Fallback strategies
- Connection timeouts
Data Validation
Validate:
- Required fields
- Data types
- Value ranges
- Timestamp validity
Best Practices
1. Start Simple
- Begin with basic configuration
- Test with one symbol
- Verify data accuracy
- Then expand
2. Document Configuration
- Keep notes on API details
- Document authentication
- Record parsing logic
- Save test results
3. Handle Errors
- Implement retry logic
- Handle rate limits
- Manage timeouts
- Log errors
4. Optimize Performance
- Cache responses when possible
- Minimize API calls
- Use appropriate timeframes
- Batch requests if supported
5. Test Thoroughly
- Test with multiple symbols
- Verify different timeframes
- Check historical data
- Validate real-time updates
Security Considerations
API Key Management
- Store keys securely
- Use environment variables
- Rotate keys regularly
- Limit key permissions
Data Privacy
- Understand data usage
- Comply with terms of service
- Protect sensitive data
- Monitor API access
Network Security
- Use HTTPS
- Verify SSL certificates
- Secure connections
- Monitor network traffic
Troubleshooting
Common Issues
Connection Errors
- Check endpoint URL
- Verify network connectivity
- Test authentication
- Review error messages
Parsing Errors
- Verify data format
- Check field mapping
- Validate timestamps
- Review parsing logic
Rate Limiting
- Adjust request frequency
- Implement backoff
- Check API limits
- Contact provider
Comparison: Custom API vs. Templates
| Feature | Custom API | Templates |
|---|---|---|
| Setup complexity | High | Low |
| Flexibility | Maximum | Limited |
| Maintenance | Manual | Automatic |
| Best for | Advanced users | Quick start |
| Customization | Full control | Pre-configured |