StakeAPI

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

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

FeatureDescription
Casino APIBrowse games, providers, categories, RTP data, and more
Sports BettingAccess live events, odds, leagues, and markets
User ManagementProfiles, balances, statistics, and transaction history
AnalyticsBet history, win rates, ROI tracking, and performance metrics
Secure AuthToken-based authentication with automatic session handling
Fully AsyncBuilt on aiohttp for blazing-fast concurrent requests
Pydantic ModelsType-safe data models with automatic validation
GraphQL SupportNative GraphQL queries for the Stake.com API
Error HandlingGranular exception hierarchy for robust applications
Zero ConfigWorks 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())

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

Ready to Start Building?

Grab a Stake.com account, get your access token, and install StakeAPI:

pip install stakeapi

Then head to the Installation Guide for detailed setup instructions.