📈 Trading crypto too? ChipaX is our own perpetuals exchange — and it has a Python API.
pip install chipaxgives you perps on real Hyperliquid liquidity, plus a free $100,000 paper account that charges the same fees and enforces the same leverage caps as live trading. No deposit or KYC to practise. → chipax-python
Join our affiliate link: https://stake.com/?c=WY7953wQ
✨ Build with Chipa Editor — the AI-powered strategy editor for Traders. Try it free!
An unofficial Python API wrapper for stake.com - the online gambling platform.
This is an unofficial API wrapper and is not affiliated with, endorsed by, or connected to stake.com in any way. Use at your own risk and ensure compliance with all applicable laws and regulations in your jurisdiction.
- 🎰 Access to casino games data
- 🏈 Sports betting information
- 👤 User account management
- 📊 Statistics and analytics
- 🔐 Secure authentication handling
- ⚡ Async support for high performance
- 📡 Live data over WebSocket (Crash, bet feeds, live odds, chat)
- 🌐 Log in through a real Chrome window, or reuse your own Chrome login (
pip install "stakeapi[browser]")
pip install stakeapiOn Debian and Ubuntu, pip refuses to install into the system Python ("externally-managed-environment"). Use a virtual environment:
python3 -m venv ~/venvs/stake && ~/venvs/stake/bin/pip install "stakeapi[browser]"import asyncio
from stakeapi import StakeAPI
async def main():
# Initialize with access token from stake.com
async with StakeAPI(access_token="your_access_token") as client:
# Get account balance
balance = await client.get_user_balance()
print(f"Available balance: {balance['available']}")
print(f"Vault balance: {balance['vault']}")
asyncio.run(main())Sites like stake.com often refuse plain Python requests with a 403 from their bot protection, even with valid cookies. The reliable way is to send the requests from a real Chrome window that is logged in with your own Chrome session:
pip install "stakeapi[browser]"async with StakeAPI.with_browser("https://stake.com", import_cookies_from="chrome") as client:
print(await client.get_user_balance())Nothing is typed for you and no password leaves your machine. See the browser login guide.
- Log in to stake.com in your browser
- Open Developer Tools (F12)
- Go to the Network tab
- Make any action that triggers a request (like checking balance)
- Find a GraphQL request to
/_api/graphql - Right-click → Copy as cURL
- Extract the x-access-token from the cURL command
The access token will be in a header like:
-H "x-access-token: your_token_here"
For detailed documentation, please visit chipadevteam.github.io/StakeAPI.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues, please file them in the issues section.