Stake API Telegram Bot Python License
Up-to-date documentation of the Stake.com GraphQL API. Balance · Bets · Withdrawals · Tips · Sessions · KYC · Highrollers
Try Telegram Bot · Star this repo · Report Issue
Don't want to write code? Use the bot.
@stakecontrolbot — your Stake.com companion. Monitor bets, check balances, manage withdrawals, track highrollers — all in Telegram. 🇺🇸 English · 🇷🇺 Russian
- English
- Русский
Stake.com is one of the world's largest crypto gambling and sports betting platforms. It uses a single GraphQL endpoint for all operations — account data, bets, withdrawals, tips, and more.
POST https://stake.com/_api/graphql
All requests are authenticated via a personal API token passed as x-access-token header. This token grants read access and the ability to initiate withdrawals (which additionally require email confirmation).
This is an unofficial, community-maintained documentation. Stake.com does not publish an official API reference. Use at your own risk.
- Log in to Stake.com
- Click your avatar → Settings → Security → API Tokens
- Click Create Token
- Copy the generated token
POST https://stake.com/_api/graphql Content-Type: application/json x-access-token: YOUR_API_TOKEN
Security: Your API token cannot change your password, email or 2FA settings. Withdrawals always require a separate email code.
import requests API_KEY = "your_api_key_here" ENDPOINT = "https://stake.com/_api/graphql" headers = { "content-type": "application/json", "x-access-token": API_KEY, "origin": "https://stake.com", "referer": "https://stake.com/", } query = """ query UserBalances { user { id balances { available { amount currency } vault { amount currency } } } } """ response = requests.post(ENDPOINT, headers=headers, json={"query": query}) data = response.json() for b in data["data"]["user"]["balances"]: print(f"{b['available']['currency'].upper()}: {b['available']['amount']}")
const API_KEY = "your_api_key_here"; const ENDPOINT = "https://stake.com/_api/graphql"; const query = ` query UserBalances { user { balances { available { amount currency } } } } `; const res = await fetch(ENDPOINT, { method: "POST", headers: { "content-type": "application/json", "x-access-token": API_KEY, }, body: JSON.stringify({ query }), }); const { data } = await res.json(); console.log(data.user.balances);
| Method | Description |
|---|---|
UserBalances |
All wallet balances: available + vault |
UserKycInfo |
KYC status, verification level, ban status |
SendTipMeta |
Lookup user info before sending tip |
TipLimit |
Minimum tip amount for a given currency |
UserPhoneMeta |
Phone number details |
UserEmailMeta |
Email address and verification status |
SessionList |
Active login sessions |
UserApiKeys |
Issued API keys |
CreateWithdrawalMeta |
Withdrawal fees and minimum amounts |
CurrencyConversionRate |
Crypto → fiat exchange rates |
GetUserCountry |
Detected country from IP/flags |
UserCommunityPreferences |
Rain exclusion and community settings |
IgnoredUserList |
List of users you have ignored |
UpdateUserPasswordMeta |
Check if account password is set |
| Method | Description |
|---|---|
SendTip |
Send tip to another user |
CreateWithdrawal |
Withdraw crypto to external address |
TerminateSession |
Kill an active session |
requestUserTfa |
Request 2FA setup token |
RequestEnableUserTfa |
Activate 2FA |
query UserBalances { user { id balances { available { amount currency } vault { amount currency } } } }
Example response
{
"data": {
"user": {
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"balances": [
{
"available": { "amount": 0.00123456, "currency": "btc" },
"vault": { "amount": 0.0, "currency": "btc" }
},
{
"available": { "amount": 12.34, "currency": "usdt" },
"vault": { "amount": 0.0, "currency": "usdt" }
}
]
}
}
}query CurrencyConversionRate { info { currencies { name usd: value(fiatCurrency: usd) eur: value(fiatCurrency: eur) rub: value(fiatCurrency: rub) } } }
query UserKycInfo { user { id kycStatus hasEmailVerified isBanned isSuspended kycBasic { status firstName lastName country city birthday } } }
query SendTipMeta($name: String) { user(name: $name) { id name } self: user { id balances { available { amount currency } } } }
query TipLimit($currency: CurrencyEnum!) { info { currency(currency: $currency) { tipMin { value } } } }
Variables: { "currency": "btc" }
mutation SendTip( $userId: String! $amount: Float! $currency: CurrencyEnum! $isPublic: Boolean $chatId: String! $tfaToken: String ) { sendTip( userId: $userId amount: $amount currency: $currency isPublic: $isPublic chatId: $chatId tfaToken: $tfaToken ) { id amount currency user { id name } sendBy { id name balances { available { amount currency } } } } }
Variables:
{
"userId": "target-user-uuid",
"amount": 0.001,
"currency": "btc",
"isPublic": true,
"chatId": "c65b4f32-0001-4e1d-9cd6-e4b3538b43ae"
}query CreateWithdrawalMeta { user { id hasTfaEnabled balances { available { amount currency } vault { amount currency } } } info { currencies { name withdrawalFee { value } withdrawalMin { value } } } }
mutation CreateWithdrawal( $currency: CryptoCurrencyEnum! $address: String! $amount: Float! $chain: CryptoChainEnum $emailCode: String $tfaToken: String ) { createWithdrawal( currency: $currency address: $address amount: $amount chain: $chain emailCode: $emailCode tfaToken: $tfaToken ) { id } }
Variables:
{
"currency": "btc",
"address": "bc1q...",
"amount": 0.001,
"emailCode": "123456",
"tfaToken": "654321"
}query SessionList($offset: Int = 0, $limit: Int = 10) { user { id sessionList(offset: $offset, limit: $limit) { id sessionName ip country city active updatedAt } } }
mutation TerminateSession($sessionId: String!) { terminateSession(sessionId: $sessionId) { id sessionName active } }
query UserApiKeys { user { id apiKeys { id ip active sessionName type createdAt updatedAt } } }
query UserBetHistory($limit: Int, $offset: Int) { user { sportBetList(limit: $limit, offset: $offset) { id bet { ... on SportBet { amount currency status payout payoutMultiplier outcomes { odds status outcome { name payout } fixture { name tournament { category { sport { name slug } } } } } } } } } }
import requests from typing import Optional class StakeClient: ENDPOINT = "https://stake.com/_api/graphql" def __init__(self, api_key: str): self.session = requests.Session() self.session.headers.update({ "content-type": "application/json", "x-access-token": api_key, "origin": "https://stake.com", "referer": "https://stake.com/", "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", }) def _request(self, query: str, variables: dict = None, operation: str = None) -> dict: payload = {"query": query} if variables: payload["variables"] = variables if operation: payload["operationName"] = operation r = self.session.post(self.ENDPOINT, json=payload) r.raise_for_status() return r.json() def get_balances(self) -> dict: return self._request(""" query UserBalances { user { balances { available { amount currency } vault { amount currency } } } } """, operation="UserBalances") def get_exchange_rates(self) -> dict: return self._request(""" query CurrencyConversionRate { info { currencies { name usd: value(fiatCurrency: usd) eur: value(fiatCurrency: eur) } } } """) def get_sessions(self, limit: int = 10) -> dict: return self._request(""" query SessionList($limit: Int) { user { sessionList(limit: $limit) { id sessionName ip country active updatedAt } } } """, variables={"limit": limit}) def send_tip(self, user_id: str, amount: float, currency: str, tfa: Optional[str] = None) -> dict: variables = { "userId": user_id, "amount": amount, "currency": currency, "isPublic": True, "chatId": "c65b4f32-0001-4e1d-9cd6-e4b3538b43ae", } if tfa: variables["tfaToken"] = tfa return self._request(""" mutation SendTip($userId: String!, $amount: Float!, $currency: CurrencyEnum!, $isPublic: Boolean, $chatId: String!, $tfaToken: String) { sendTip(userId: $userId, amount: $amount, currency: $currency, isPublic: $isPublic, chatId: $chatId, tfaToken: $tfaToken) { id amount currency user { id name } } } """, variables=variables, operation="SendTip") def withdraw(self, currency: str, address: str, amount: float, email_code: Optional[str] = None, tfa: Optional[str] = None) -> dict: variables = {"currency": currency, "address": address, "amount": amount} if email_code: variables["emailCode"] = email_code if tfa: variables["tfaToken"] = tfa return self._request(""" mutation CreateWithdrawal($currency: CryptoCurrencyEnum!, $address: String!, $amount: Float!, $emailCode: String, $tfaToken: String) { createWithdrawal(currency: $currency, address: $address, amount: $amount, emailCode: $emailCode, tfaToken: $tfaToken) { id } } """, variables=variables, operation="CreateWithdrawal") # --- Usage --- client = StakeClient("YOUR_API_KEY") result = client.get_balances() for b in result["data"]["user"]["balances"]: avail = b["available"] print(f"{avail['currency'].upper()}: {avail['amount']}")
import time import requests API_KEY = "your_api_key" ENDPOINT = "https://stake.com/_api/graphql" HEADERS = {"content-type": "application/json", "x-access-token": API_KEY} QUERY = """ query { user { sportBetList(limit: 5, offset: 0) { id bet { ... on SportBet { amount currency payout status outcomes { fixture { name } odds status } }} }}} """ seen = set() print("Monitoring bets... (Ctrl+C to stop)") while True: try: r = requests.post(ENDPOINT, headers=HEADERS, json={"query": QUERY}) bets = r.json()["data"]["user"]["sportBetList"] for item in bets: if item["id"] not in seen: seen.add(item["id"]) b = item["bet"] profit = b["payout"] - b["amount"] sign = "+" if profit >= 0 else "" match = b["outcomes"][0]["fixture"]["name"] if b["outcomes"] else "?" print(f"[{b['currency'].upper()}] {match}: {b['amount']:.6f} → {sign}{profit:.6f}") except Exception as e: print(f"Error: {e}") time.sleep(5)
| Symbol | Name | Networks |
|---|---|---|
btc |
Bitcoin | Bitcoin |
eth |
Ethereum | ETH, Arbitrum, Base |
usdt |
Tether | ETH, TRC-20, BSC, SOL |
usdc |
USD Coin | ETH, TRC-20, BSC, SOL, Base |
sol |
Solana | Solana |
bnb |
BNB | BSC |
ltc |
Litecoin | Litecoin |
xrp |
Ripple | Ripple |
trx |
TRON | TRON |
doge |
Dogecoin | Dogecoin |
eos |
EOS | EOS |
bch |
Bitcoin Cash | Bitcoin Cash |
response = requests.post(ENDPOINT, headers=headers, json={"query": query}) data = response.json() if "errors" in data: for error in data["errors"]: msg = error["message"] # Common errors: # "Not authenticated" — invalid/missing API key # "Too many requests" — slow down, you're rate limited # "Forbidden" — action not allowed for your account # "Invalid otp" — wrong 2FA or email code print(f"API Error: {msg}") else: print(data["data"])
Rate limits: Stake doesn't publish limits. Keep requests under 1 req/sec to stay safe. Use requests.Session() to reuse connections.
@stakecontrolbot — no code required, everything below works out of the box.
| Feature | Description |
|---|---|
| Live Balance | All currencies with real-time USD equivalent |
| Active Bets | Open sport bets with odds and potential payout |
| Bet History | Settled bets with win/loss status, paginated |
| Transactions | Deposit/withdrawal history with USD conversion |
| Tips | Incoming & outgoing tips with pagination |
| Feature | Description |
|---|---|
| ROI Calculator | Win rate, profit/loss, ROI% for last 25/50/100/200 bets |
| Sport Statistics | Per-sport breakdown: WR%, ROI%, average odds, volume |
| Performance Tracking | See exactly which sports drain your bankroll |
| Feature | Description |
|---|---|
| Withdrawals | Full flow: currency → network → address → amount → email code |
| Saved Wallets | Address book for quick withdrawals |
| Email Confirmation | 2FA email code directly inside Telegram |
| Feature | Description |
|---|---|
| Trending Bets | Real-time trending sport bets across Stake |
| Highrollers | Paginated highroller feed with USD volume |
| Suspicious Matches | Detect matches with unusual highroller concentration |
| Smart Money | Top players ranked by total wagered volume |
| Live Lines | Track odds movements on specific fixtures |
| Feature | Description |
|---|---|
| Smart Alerts | Push notifications for large highroller bets every 2 min |
| Custom Threshold | Set your own threshold: 1ドルK / 5ドルK / 10ドルK / 25ドルK / custom |
- Full Russian / Полный русский интерфейс
- Full English
| Feature | Bot | Other tools |
|---|---|---|
| ROI Calculator | + | - |
| Sport Statistics | + | - |
| Highroller Alerts | + | basic |
| Custom Alert Threshold | + | - |
| Smart Money Analysis | + | - |
| Live Odds Tracking | + | - |
| Full Withdrawal Flow | + | partial |
| Saved Wallets | + | - |
| No token for market data | + | - |
| Russian + English | + | EN only |
Stake.com использует единый GraphQL эндпоинт для всех операций:
POST https://stake.com/_api/graphql
Все запросы аутентифицируются через личный API токен в заголовке x-access-token.
Это неофициальная, поддерживаемая сообществом документация. Используйте на свой страх и риск.
- Войдите на Stake.com
- Аватар → Настройки → Безопасность → API токены
- Нажмите Создать токен
- Скопируйте токен
POST https://stake.com/_api/graphql Content-Type: application/json x-access-token: ВАШ_ТОКЕН
Токен не позволяет менять пароль, email или 2FA. Выводы требуют отдельного кода с email.
import requests API_KEY = "ваш_api_токен" ENDPOINT = "https://stake.com/_api/graphql" headers = { "content-type": "application/json", "x-access-token": API_KEY, } query = """ query UserBalances { user { balances { available { amount currency } } } } """ r = requests.post(ENDPOINT, headers=headers, json={"query": query}) for b in r.json()["data"]["user"]["balances"]: print(f"{b['available']['currency'].upper()}: {b['available']['amount']}")
| Метод | Описание |
|---|---|
UserBalances |
Все балансы кошельков (доступный + vault) |
UserKycInfo |
Статус KYC верификации |
SendTipMeta |
Поиск пользователя перед отправкой чаевых |
TipLimit |
Минимальная сумма чаевых для валюты |
SessionList |
Список активных сессий |
UserApiKeys |
Список выданных API ключей |
CreateWithdrawalMeta |
Комиссии и минимумы вывода |
CurrencyConversionRate |
Курсы крипто/фиат |
GetUserCountry |
Определение страны пользователя |
| Метод | Описание |
|---|---|
SendTip |
Отправить чаевые другому пользователю |
CreateWithdrawal |
Вывод крипты на внешний адрес |
TerminateSession |
Завершить активную сессию |
@stakecontrolbot — работает без написания кода.
Возможности:
- Мониторинг баланса в реальном времени
- История ставок и ROI статистика
- Управление выводами с сохранёнными кошельками
- Мониторинг хайроллеров и подозрительных матчей
- Умные алерты по настраиваемому порогу
- Интерфейс на русском и английском
This project is not affiliated with, endorsed by, or connected to Stake.com. All trademarks belong to their respective owners. Use at your own risk.
Данный проект не является официальным и не связан с Stake.com. Все торговые марки принадлежат их владельцам. Используйте на свой страх и риск.
If this helped you, star the repo — it helps others find it