Trading: Full Stack
Get the complete Datafye trading environment running in under 5 minutes. Includes data, broker connectivity, algo runtime, backtesting, and AI assistance.
What you'll have:
Data Cloud with synthetic market data
Broker Connector for Alpaca paper trading
Algo Container runtime with example strategy
Backtesting engine with sample results
Environment MCP Server for AI-assisted development
Prerequisites:
Docker Desktop installed and running
12GB+ RAM available
Alpaca paper trading account (free - sign up here)
Python 3.7+ (optional - for testing)
Step 1: Install the Datafye CLI
Verify installation:
Expected output:
Step 2: Get Alpaca Credentials
Sign up for a free Alpaca paper trading account at alpaca.markets
Navigate to your paper trading dashboard
Copy your API Key ID and Secret Key
Set as environment variables:
Step 3: Download Deployment Descriptor
This descriptor configures:
Synthetic dataset with 10 symbols:
Tech: AAPL, MSFT, GOOGL, AMZN, NVDA
Growth: TSLA, META, NFLX, AMD, INTC
Trades and quotes (tick data)
1-minute OHLC bars
90 days of historical data
Alpaca Broker Connector (paper trading mode)
Pre-built momentum algo container
Backtesting engine
Environment MCP Server
No additional API keys required (besides Alpaca)
Step 4: Provision Full Stack Environment
Sneak Preview Note: This quickstart shows the expected workflow and interface. During the preview period, provisioning is not yet available and this command will display a "not yet implemented" message. This is expected behavior for the preview.
Expected Output (when available):
Provisioning takes 5-10 minutes.
What Just Happened?
The deployment descriptor configured:
Data Cloud - Normalized market data service with REST and WebSocket APIs
Broker Connector - Integration with Alpaca for paper trading
Algo Container Runtime - Managed environment for running trading algorithms
Backtesting Engine - Historical strategy testing and optimization
Environment MCP Server - AI-assisted exploration and development
Synthetic Dataset - 10 symbols with 90 days of historical data:
Tech: AAPL, MSFT, GOOGL, AMZN, NVDA
Growth: TSLA, META, NFLX, AMD, INTC
Data Types - Trades, quotes, and 1-minute OHLC bars
What's running:
Data Cloud container at
http://localhost:8080Broker Connector container at
http://localhost:8082Algo Runtime container at
http://localhost:8081Environment MCP Server at
http://localhost:3000Connected to your Alpaca paper trading account
Pre-built momentum algo deployed and ready to trade
Backtesting engine ready for strategy testing
About the Synthetic Dataset: The Synthetic dataset attempts to generate realistic market data and is appropriate for demo and API testing purposes. It is NOT suitable for actual algo development - use real market data providers (Polygon, Alpaca, etc.) for developing and validating production algorithms.
Step 5: Verify Services
Option A: Python Test Script
Output:
Option B: CLI Commands
Step 6: Run a Backtest
Expected output:
View full scorecard:
Step 7: Paper Trade Your Algo
Start your algo in paper trading mode:
Monitor trades in real-time:
Step 8: Connect AI Tools (Optional)
The Environment MCP Server at http://localhost:3000 enables AI-assisted development and analysis.
Setup:
Configure your AI tool (VS Code, Cursor, Claude, etc.) with MCP server endpoint
Explore your deployment conversationally
Analyze backtest results with AI assistance
Debug algo behavior interactively
See: Integrating with AI Agents
Manage Your Deployment
Next Steps
Learn the SDK:
SDK Getting Started - Build custom algos
Deep dive into backtesting:
AI-assisted development:
Paper trading best practices:
Production deployment:
Troubleshooting
Docker not running: Start Docker Desktop and retry.
Insufficient resources: Increase Docker memory to 12GB+ in Docker Desktop settings.
Broker connection failed: Verify your ALPACA_API_KEY and ALPACA_SECRET_KEY environment variables are set correctly.
Port conflicts: Stop conflicting services or see CLI Reference for custom ports.
MCP server not responding: Check docker logs datafye-mcp-server
Algo not trading: Check algo logs with datafye trading algo logs <algo-name> and verify broker account status.
Last updated: 2025-01-23
Last updated

