CS Skin Purchasing Bot This Python bot automates the process of purchasing CS skins from online marketplaces. It monitors two APIs (SkinBaron and PriceEmpire) to find profitable items, analyzes the price difference, and attempts to buy the skins if they meet the defined profitability criteria. The bot is equipped with robust error handling and sends notifications for purchase attempts.
Features Marketplace Monitoring: Fetches real-time skin data from SkinBaron and PriceEmpire APIs. Profitability Calculation: Analyzes prices from both platforms to determine the potential profit. Automated Purchasing: If the conditions meet your defined thresholds, the bot attempts to buy the skin. Error Handling: Robust error handling ensures the bot operates reliably. Notifications: Purchase attempt notifications are sent through your preferred method (email, SMS, etc.). Requirements Before running the bot, ensure that you have the following prerequisites:
Python 3.x requests module (for API calls) json module (for data handling) logging module (for logging errors and events) Notification service credentials (if required) Optional Requirements smtplib (for email notifications) twilio (for SMS notifications) You can install dependencies using:
bash Copy code pip install requests twilio Setup Clone the Repository Clone this repository to your local machine using:
bash Copy code git clone https://github.com/your-repo/csgo-skin-purchasing-bot.git API Keys Obtain API keys for both SkinBaron and PriceEmpire. Add these keys to your environment or a configuration file.
Configuration Update the configuration file (config.json) with your API keys, notification preferences, and profitability thresholds:
json Copy code { "skinbaron_api_key": "your_skinbaron_api_key", "priceempire_api_key": "your_priceempire_api_key", "profit_threshold": 5.0, "notification_method": "email" # or "sms" } Notifications Setup If using notifications, configure the necessary credentials:
For email notifications, ensure you have SMTP details. For SMS notifications, configure Twilio credentials. Run the Bot Start the bot by running the following command:
bash Copy code python bot.py Usage Once the bot is running, it will:
Fetch data from SkinBaron and PriceEmpire APIs. Compare prices and calculate potential profit. Attempt to purchase skins that meet the profit threshold. Send notifications for purchase attempts. Error Handling The bot handles a variety of errors, such as:
API call failures Invalid or missing API keys Network issues