StakeAPI Documentation
The most powerful unofficial Python wrapper for the Stake.com API. Build bots, analytics dashboards, and automation tools with ease.
Get Started View on GitHub Sign Up on Stake.com
Why StakeAPI?
StakeAPI gives you programmatic access to everything Stake.com offers β casino games, sports betting, account management, and real-time data. Whether youβre building a personal dashboard, an analytics tool, or automated strategies, StakeAPI is the foundation you need.
Key Features
| Feature | Description |
|---|---|
| π° Casino API | Browse games, providers, categories, RTP data, and more |
| π Sports Betting | Access live events, odds, leagues, and markets |
| π€ User Management | Profiles, balances, statistics, and transaction history |
| π Analytics | Bet history, win rates, ROI tracking, and performance metrics |
| π Secure Auth | Token-based authentication with automatic session handling |
| β‘ Fully Async | Built on aiohttp for blazing-fast concurrent requests |
| π§© Pydantic Models | Type-safe data models with automatic validation |
| π GraphQL Support | Native GraphQL queries for the Stake.com API |
| π‘οΈ Error Handling | Granular exception hierarchy for robust applications |
| π¦ Zero Config | Works out of the box β just provide your access token |
Quick Example
import asyncio
from stakeapi import StakeAPI
async def main():
async with StakeAPI(access_token="your_token") as client:
# Get your balance
balance = await client.get_user_balance()
print(f"Available: {balance['available']}")
print(f"Vault: {balance['vault']}")
# Browse casino games
games = await client.get_casino_games(category="slots")
for game in games[:5]:
print(f"{game.name} by {game.provider} β RTP: {game.rtp}%")
# Check sports events
events = await client.get_sports_events(sport="football")
for event in events[:3]:
print(f"{event.home_team} vs {event.away_team}")
asyncio.run(main())
π‘ Don't have a Stake.com account yet? Sign up here to get started and unlock all API features.
Architecture Overview
ββββββββββββββββββββββββββββββββββββββββββββββββ
β Your Application β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β StakeAPI Client β
β ββββββββββββ βββββββββββββ βββββββββββββββ β
β β Auth β β GraphQL β β REST β β
β β Manager β β Engine β β Client β β
β ββββββββββββ βββββββββββββ βββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β ββββββββββββ βββββββββββββ βββββββββββββββ β
β β Models β β Endpoints β β Utils β β
β β(Pydantic)β β β β β β
β ββββββββββββ βββββββββββββ βββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β aiohttp / WebSockets β
ββββββββββββββββββββββββββββββββββββββββββββββββ€
β Stake.com GraphQL API β
ββββββββββββββββββββββββββββββββββββββββββββββββ
What Can You Build?
- Balance Trackers β Monitor your crypto balances in real-time
- Betting Bots β Automate your betting strategies with code
- Analytics Dashboards β Visualize your betting history and win rates
- Portfolio Managers β Track your vault and available funds across currencies
- Odds Scrapers β Collect and analyze sports odds data
- Alert Systems β Get notified when specific conditions are met
- Performance Reports β Generate detailed reports on your betting performance
Supported Python Versions
StakeAPI supports Python 3.8 and above:
- Python 3.8
- Python 3.9
- Python 3.10
- Python 3.11
- Python 3.12
Community & Support
- GitHub Issues β Report bugs and request features
- Contributing Guide β Learn how to contribute
- Changelog β See whatβs new
- Discord Server β Join the community, get help, and share your projects
π¬ Join the StakeAPI Community on Discord
Get help, share your projects, discuss strategies, and stay up to date with the latest StakeAPI news.
Join Our Discord Server βReady to Start Building?
The fastest way to get started is to create a Stake.com account, grab your access token, and install StakeAPI:
pip install stakeapi
Then head to the Installation Guide for detailed setup instructions.