Automated Cryptocurrency Trading Bot
Algorithmic Trading System Built on AWS Lambda
A serverless trading bot that automatically executes cryptocurrency trades on Kraken exchange using market analysis algorithms and risk management protocols.
System Overview
Serverless Architecture - Runs on AWS Lambda with scheduled execution, eliminating server maintenance and reducing operational costs
API Integration - Connects to Kraken exchange for order execution and CoinMarketCap for real-time price data across 24 whitelisted cryptocurrencies
Algorithmic Decision Making - Uses weighted price change analysis across 1-hour, 24-hour, and 7-day timeframes to identify optimal entry points
Risk Management - Implements automatic stop-loss orders and profit-taking mechanisms with configurable thresholds
Core Functionality
Market Analysis Algorithm
Analyzes price stability and momentum across multiple timeframes
Weights recent price changes more heavily than historical data
Filters out consistently declining assets to avoid falling knife scenarios
Only executes trades when market conditions meet minimum stability thresholds
Order Management System
Buy Orders: Creates limit orders 0.1% below current market price for better execution
Sell Orders: Sets profit targets 0.75% above purchase price
Order Editing: Gradually lowers sell prices if orders remain unfilled after multiple cycles
Position Tracking: Monitors order status and manages trade lifecycle
State Management
Uses AWS Systems Manager Parameter Store to track execution cycles
Implements waiting periods to avoid overtrading in volatile markets
Maintains trade history and performance metrics
Technical Implementation
Language: Python 3.x deployed as AWS Lambda function
APIs: Kraken Pro API for trading, CoinMarketCap Pro API for market data
Authentication: HMAC-SHA512 signatures for secure API communication
Storage: AWS SSM Parameter Store for state persistence
Notifications: SNS integration for trade alerts and error reporting
Scheduling: Configurable execution intervals (20-30 minute cycles)
Risk Management Features
Portfolio Limits - Fixed $2,350 position sizing to control exposure
Market Filters - Only trades assets with $500M+ market cap for liquidity
Threshold Controls - Requires market stability scores above a specific threshold for execution
Backup Symbol Logic - Avoids repeatedly trading the same asset
Error Handling - Comprehensive exception management with notification alerts
Adoption Considerations
Deployment - Requires setting up AWS Lambda w/ schedule, SSM Parameter Store and IAM Service Roles
Execution Speed - Serverless architecture enables rapid response to market conditions
Cost Efficiency - Pay-per-execution model reduces operational expenses
Scalability - Can handle multiple trading pairs without infrastructure changes
Reliability - Built-in error visibility and notification systems
Key Limitations
Market Dependency - Performance tied to overall crypto market conditions
Algorithm Simplicity - Uses basic technical indicators rather than advanced ML models
Limited Backtesting - Not run for an extended period
Exchange Risk - Relies on single exchange (Kraken) for execution
Regulatory Considerations - Designed for personal use, not institutional deployment
Technical Skills Demonstrated
API Integration with financial services requiring secure authentication
Serverless Architecture design and implementation
Algorithmic Trading concepts and risk management
State Management in distributed systems
Error Handling in financial applications where reliability is critical
Cloud Service Integration across multiple AWS services
This project showcases practical experience with financial APIs, algorithmic decision-making, and serverless architecture while demonstrating understanding of trading risks and system limitations.