docs: add CODE_OF_CONDUCT, CONTRIBUTING, LICENSE, and SECURITY policies
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and unwelcome sexual attention or advances
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project team responsible for enforcement at [contact@mazonia.dev](mailto:contact@mazonia.dev) or by contacting the repository maintainers. All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
# Contributing to XAUUSD AI Trading Bot
|
||||
|
||||
Thank you for your interest in contributing to **XAUUSD AI Trading Bot**! We welcome contributions from developers, quantitative traders, data scientists, and open-source enthusiasts.
|
||||
|
||||
Please take a moment to review this document to ensure a smooth contribution process.
|
||||
|
||||
---
|
||||
|
||||
## 📋 Table of Contents
|
||||
|
||||
1. [Code of Conduct](#-code-of-conduct)
|
||||
2. [How to Contribute](#-how-to-contribute)
|
||||
- [Reporting Bugs](#reporting-bugs)
|
||||
- [Suggesting Features](#suggesting-features)
|
||||
- [Submitting Pull Requests](#submitting-pull-requests)
|
||||
3. [Development Setup](#-development-setup)
|
||||
4. [Testing & Quality Assurance](#-testing--quality-assurance)
|
||||
5. [Code Style & Standards](#-code-style--standards)
|
||||
6. [Financial & Trading Disclaimer](#-financial--trading-disclaimer)
|
||||
|
||||
---
|
||||
|
||||
## 📜 Code of Conduct
|
||||
|
||||
This project adheres to the Contributor Covenant [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold these standards.
|
||||
|
||||
---
|
||||
|
||||
## 🚀 How to Contribute
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
Before creating a bug report, please check existing issues to avoid duplicates. When filing an issue, please include:
|
||||
- A clear and descriptive title.
|
||||
- Detailed steps to reproduce the issue.
|
||||
- Expected behavior vs. actual behavior.
|
||||
- Relevant log output (with sensitive API keys/credentials redacted).
|
||||
- System information (OS version, MetaTrader 5 version, Python version).
|
||||
|
||||
### Suggesting Features
|
||||
|
||||
Feature requests are highly encouraged! Please describe:
|
||||
- The trading strategy, ML model enhancement, or system feature you would like added.
|
||||
- Why this enhancement would benefit the project.
|
||||
- Any potential risks or edge cases (e.g., execution latency, slippage, market regimes).
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
1. **Fork** the repository and create a new feature branch:
|
||||
```bash
|
||||
git checkout -b feature/your-feature-name
|
||||
```
|
||||
2. Make your changes adhering to our coding standards.
|
||||
3. Write or update tests covering your changes.
|
||||
4. Run the test suite to ensure all tests pass:
|
||||
```bash
|
||||
pytest
|
||||
```
|
||||
5. Commit your changes with concise, descriptive commit messages:
|
||||
```bash
|
||||
git commit -m "feat(strategy): add momentum-filter for XAUUSD regime detection"
|
||||
```
|
||||
6. Push to your fork and open a **Pull Request** against `main`.
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Development Setup
|
||||
|
||||
1. **Clone the repository:**
|
||||
```bash
|
||||
git clone https://github.com/Mazonia/xau-traderbot.git
|
||||
cd xau-traderbot
|
||||
```
|
||||
|
||||
2. **Set up a Python virtual environment:**
|
||||
```bash
|
||||
python -m venv venv
|
||||
# On Windows:
|
||||
venv\Scripts\activate
|
||||
# On Linux/macOS:
|
||||
source venv/bin/activate
|
||||
```
|
||||
|
||||
3. **Install dependencies:**
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
4. **Environment Configuration:**
|
||||
Copy `.env.example` (if present) or configure your environment variables for local testing (e.g., MT5 credentials, Telegram bot keys, Gemini API key). Never commit actual secrets or credentials!
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Testing & Quality Assurance
|
||||
|
||||
We use `pytest` for unit and integration testing.
|
||||
|
||||
- Run all tests:
|
||||
```bash
|
||||
pytest
|
||||
```
|
||||
- Run tests with coverage:
|
||||
```bash
|
||||
pytest --cov=.
|
||||
```
|
||||
- Ensure all automated tests pass before submitting your PR.
|
||||
|
||||
---
|
||||
|
||||
## 🎨 Code Style & Standards
|
||||
|
||||
- **Python Version**: Python 3.10+
|
||||
- **Style Guide**: Follow [PEP 8](https://peps.python.org/pep-0008/) conventions.
|
||||
- **Type Annotations**: Use type hints for function signatures wherever possible.
|
||||
- **Docstrings**: Provide clear docstrings for classes and non-trivial functions (Google style preferred).
|
||||
- **Security**: Never hardcode private keys, MT5 passwords, or webhook secret tokens.
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Financial & Trading Disclaimer
|
||||
|
||||
This software is developed for educational, research, and algorithmic trading experimentation purposes. Trading spot gold (XAUUSD) or leveraged financial instruments involves substantial risk of loss. Contributions involving order execution, risk management, or position sizing must be carefully tested in demo environments prior to deployment.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Mazonia
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
# Security Policy
|
||||
|
||||
## 🛡️ Supported Versions
|
||||
|
||||
We actively issue security updates and patches for the following versions of **XAUUSD AI Trading Bot**:
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 3.x.x | :white_check_mark: |
|
||||
| < 3.0.0 | :x: |
|
||||
|
||||
---
|
||||
|
||||
## 🔒 Reporting a Vulnerability
|
||||
|
||||
We take the security of this software very seriously, particularly because it manages algorithmic trading operations, API keys, and market execution.
|
||||
|
||||
### How to Report
|
||||
|
||||
If you discover a security vulnerability, **please do not open a public issue**. Instead, submit a security report directly to the maintainers:
|
||||
|
||||
- **Email**: [contact@mazonia.dev](mailto:contact@mazonia.dev)
|
||||
- Alternatively, submit a private vulnerability disclosure via GitHub Security Advisories if available on the repository.
|
||||
|
||||
### What to Include in Your Report
|
||||
|
||||
To help us investigate and address the vulnerability effectively, please include:
|
||||
1. A descriptive title and type of vulnerability (e.g., credential exposure, SQL injection, buffer overflow, unvalidated endpoint).
|
||||
2. Step-by-step instructions or proof-of-concept code to reproduce the issue.
|
||||
3. Potential impact of the vulnerability.
|
||||
4. Any suggested remediations or patches, if available.
|
||||
|
||||
### Disclosure Process & Timeline
|
||||
|
||||
1. **Acknowledgment**: We will acknowledge receipt of your vulnerability report within **48 hours**.
|
||||
2. **Assessment**: The maintainers will investigate the vulnerability, assess its severity, and determine an appropriate fix.
|
||||
3. **Fix & Patch**: We aim to release a patch or mitigation within **7 to 14 days** of verification, depending on complexity.
|
||||
4. **Public Announcement**: Once a fix is deployed, we will publish a release note and credit the reporter (unless anonymity is requested).
|
||||
|
||||
---
|
||||
|
||||
## 🔐 Security Best Practices for Operators
|
||||
|
||||
When running **XAUUSD AI Trading Bot** in production or live environments:
|
||||
|
||||
1. **Protect Credentials**: Store MetaTrader 5 credentials, Telegram bot tokens, Gemini API keys, and database passwords strictly in environment variables or a `.env` file. Never commit credentials to version control.
|
||||
2. **Dashboard Security**: Ensure the web dashboard and WebSocket endpoints are secured behind HTTPS and protected by strong authentication when hosted on public or non-trusted networks.
|
||||
3. **Network Isolation**: Run the MT5 bridge and trading bot scripts in restricted network environments with minimal necessary open ports.
|
||||
4. **Regular Updates**: Keep Python dependencies and the underlying MetaTrader 5 terminal updated to their latest stable releases.
|
||||
@@ -1,6 +1,6 @@
|
||||
symbol: XAUUSD
|
||||
symbol_suffix: ''
|
||||
active_mode: moderate
|
||||
active_mode: safe
|
||||
trading_modes:
|
||||
safe:
|
||||
name: Safe / Conservative
|
||||
|
||||
Reference in New Issue
Block a user