TradeCraft is an automated trading bot designed for the PlayTradeCraft.com economic simulation game. It automates various trading operations including buying, selling, production transfer, orphan order cancellation, and market analytics.
- Buyer Module: Automatically purchases products based on market conditions and inventory limits
- Seller Module: Sells products to the best available market offers
- Smart Inventory Management: Respects maximum inventory limits and keeps minimum stock levels
- Automatic Transfer: Transfers production from factories to warehouse/deposit
- Region Monitoring: Monitors multiple regions (1-6) for production capacity
- Efficiency Tracking: Only transfers when storage reaches optimal levels
- Real-time Analytics: CLI interface for monitoring market conditions
- Profit Analysis: Track profit margins and trading performance
- Order Management: View and analyze active orders
- Orphan Order Cancellation: Automatically cancels abandoned or stuck orders
- Queue-based Processing: Reliable job scheduling using BunQueue
- Comprehensive Logging: Structured logging with LogTape
- TypeScript: Full type safety throughout
- ES Modules: Modern JavaScript modules
- React: Used for CLI interfaces (via Ink)
- BunQueue: Reliable job scheduling
- Authentication: Store cookies securely in environment variables
- Rate Limiting: Built-in delays between API calls
- Error Handling: Graceful degradation on API failures
- Logging: No sensitive data in logs
Monitor the bot through:
- Console output
- Log files (
analytics.log) - PlayTradeCraft.com game interface
- CLI analytics tools
-
Authentication Errors
- Verify cookies are valid and not expired
- Check
.envfile configuration
-
API Rate Limiting
- The bot includes built-in delays
- Check PlayTradeCraft API limits
-
Inventory Issues
- Verify product configuration in
src/server.ts - Check maximum/minimum inventory settings
- Verify product configuration in
Check analytics.log for detailed error information and operational logs.
- Fork the repository
- Create a feature branch
- Make changes with proper TypeScript types
- Add tests if applicable
- Submit a pull request
Public License
This bot is designed for educational purposes and use with the PlayTradeCraft.com game. Use responsibly and in accordance with PlayTradeCraft's terms of service. The developers are not responsible for any consequences resulting from the use of this software.
For issues and feature requests:
- Check the troubleshooting section
- Review existing issues
- Create a new issue with detailed information
Note: This project is independent and not affiliated with PlayTradeCraft.com. All game-related trademarks belong to their respective owners.
