Contributing
π° New to Stake.com? Sign up with code
WY7953wQto claim your welcome bonus and support StakeAPIβs development β Create your Stake.com account
π¬ Need help? Join the Chipa Discord Β· β‘ Go no-code with ChipaEditor
Help make StakeAPI even better β contributions of all kinds are welcome!
How to Contribute
1. Fork & Clone
git clone https://github.com/chipadevteam/StakeAPI.git
cd StakeAPI2. Set Up Development Environment
# Create virtual environment
python -m venv .venv
# Activate (Windows)
.venv\Scripts\activate
# Activate (macOS/Linux)
source .venv/bin/activate
# Install dev dependencies
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install
Or use the setup script (Windows):
.\setup_dev.ps13. Create a Branch
git checkout -b feature/your-feature-name4. Make Your Changes
- Write clean, well-documented code
- Follow the existing code style (Black + isort)
- Add tests for new functionality
- Update documentation if needed
5. Run Tests
# Run all tests
pytest
# With coverage
pytest --cov=stakeapi
# Run specific test file
pytest tests/test_client.py6. Format & Lint
# Format code
black stakeapi/ tests/
isort stakeapi/ tests/
# Lint
flake8 stakeapi/ tests/
# Type check
mypy stakeapi/7. Submit a Pull Request
Push your branch and open a pull request against the main branch.
Contribution Guidelines
Code Style
- Formatter: Black (line length: 88)
- Import sorting: isort (profile: black)
- Linting: flake8
- Type hints: Required for all public methods
- Docstrings: Google style
Testing
- All new features must include tests
- Maintain or improve code coverage
- Use
pytest-asynciofor async tests - Mock external API calls
Commit Messages
Follow conventional commits:
feat: add WebSocket support
fix: handle token expiration correctly
docs: update authentication guide
test: add tests for rate limiter
refactor: simplify GraphQL request handlingWhat to Contribute
- Bug fixes β Find and fix bugs
- New features β Add API endpoint wrappers
- Documentation β Improve guides, add examples
- Tests β Increase test coverage
- Performance β Optimize request handling
- Types β Add or improve type annotations
Project Structure
StakeAPI/
βββ stakeapi/ # Main package
β βββ __init__.py # Package exports
β βββ _version.py # Version info
β βββ auth.py # Authentication
β βββ client.py # Main client
β βββ endpoints.py # API endpoints
β βββ exceptions.py # Custom exceptions
β βββ models.py # Pydantic models
β βββ utils.py # Utility functions
βββ tests/ # Test suite
β βββ conftest.py # Test fixtures
β βββ test_client.py # Client tests
β βββ test_models.py # Model tests
β βββ test_utils.py # Utility tests
βββ docs/ # Documentation
βββ examples/ # Example scripts
βββ pyproject.toml # Project configuration
βββ Makefile # Dev commandsCode of Conduct
Be respectful and constructive. Weβre all here to build something great together.
Level Up Your StakeAPI Setup
- π° Create your Stake.com account β β Register with referral code
WY7953wQto unlock your welcome bonus, rakeback, and exclusive rewards. Using our link keeps StakeAPI free and actively maintained. - π¬ Join the Chipa Discord β β Get real-time support, share your bots and strategies, and connect with hundreds of other StakeAPI developers.
- β‘ Try ChipaEditor β β Build, backtest, and deploy betting & trading strategies with our AI-powered, no-code editor. The perfect companion to StakeAPI.