Python library for MarketWatch virtual trading
I published marketwatch on PyPI: a small Python client for the MarketWatch virtual stock game (paper trading), not live brokerage access. If you want to script watchlists, pull game or portfolio data, or experiment with automation against the game, it wraps the flows in a straightforward API.
Links
- Package: pypi.org/project/marketwatch
- Documentation: antoinebou12.github.io/marketwatch
- Source & issues: github.com/antoinebou12/marketwatch
What it can do
- Create and manage watchlists
- Read game details and settings
- Inspect portfolio, positions, and pending orders
- Buy and sell (in-game)
- Fetch the leaderboard for a game
Useful if you are exploring automated strategies or small bots inside the game’s rules—see the docs for method names and return shapes.
Quick start
pip install marketwatch
from marketwatch import MarketWatch
mw = MarketWatch("your_username", "your_password")
mw.get_games()
mw.get_price("AAPL")
For login edge cases, every method, and examples for orders and watchlists, use the documentation.

Automation can conflict with a platform’s terms or rate limits; use the library responsibly and check MarketWatch’s own rules if you rely on it for anything non-trivial.
Questions or bugs are welcome on GitHub.