API Reference

Technical documentation for the 1xBet API used by the mobile application.

Last updated: January 22, 2026

Note: This is internal API documentation for reference. The API is not publicly available for third-party integration without partnership agreement.

API Overview

Property Value
Base URL https://api.1xbet.com/v2
Protocol HTTPS (TLS 1.3)
Format JSON
Authentication Bearer Token (JWT)
Rate Limit 100 requests/minute

Authentication

Login

POST /auth/login

Request:

{
  "username": "user@example.com",
  "password": "********",
  "device_id": "abc123..."
}

Response:

{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "refresh_token": "dGhpcyBpcyBhIHJlZnJl...",
  "expires_in": 1800,
  "user": {
    "id": "12345",
    "username": "user@example.com",
    "currency": "USD"
  }
}

Token Refresh

POST /auth/refresh

Request:

{
  "refresh_token": "dGhpcyBpcyBhIHJlZnJl..."
}

Using Tokens

Include the access token in all authenticated requests:

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Main Endpoints

Category Endpoint Method Description
Auth /auth/login POST User login
/auth/logout POST User logout
/auth/refresh POST Refresh token
Account /user/profile GET Get user profile
/user/balance GET Get account balance
/user/settings GET/PUT User preferences
Betting /sports GET List sports
/events GET List events
/odds/{eventId} GET Get odds for event
/bets POST Place bet
/bets/history GET Bet history
Payments /payments/methods GET Available methods
/payments/deposit POST Initiate deposit
/payments/withdraw POST Request withdrawal
/payments/history GET Transaction history

Request Format

Headers

Content-Type: application/json
Accept: application/json
Authorization: Bearer {token}
X-Device-Id: {device_fingerprint}
X-App-Version: 8.4.2
Accept-Language: en

Query Parameters

For GET requests with filters:

GET /events?sport_id=1&status=live&limit=50&offset=0

Request Body

For POST/PUT requests:

{
  "field1": "value1",
  "field2": "value2"
}

Response Format

Success Response

{
  "success": true,
  "data": {
    // Response data
  },
  "meta": {
    "timestamp": 1706000000,
    "request_id": "req_abc123"
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "E-2001",
    "message": "Invalid credentials",
    "details": "Username or password is incorrect"
  },
  "meta": {
    "timestamp": 1706000000,
    "request_id": "req_abc123"
  }
}

HTTP Status Codes

Code Meaning
200 Success
201 Created
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
429 Rate Limited
500 Server Error

WebSocket API

Real-time updates use WebSocket connections:

Connection

wss://ws.1xbet.com/v2?token={access_token}

Subscribe to Events

{
  "action": "subscribe",
  "channel": "odds",
  "event_id": "12345"
}

Incoming Messages

{
  "type": "odds_update",
  "event_id": "12345",
  "data": {
    "market_id": "1",
    "odds": [
      {"selection": "home", "price": 1.85},
      {"selection": "away", "price": 2.10}
    ]
  }
}

Channels

Channel Description
odds Live odds updates
scores Live scores
bets Bet status changes
balance Balance updates
notifications User notifications

Rate Limiting

Endpoint Type Limit Window
General 100 requests Per minute
Authentication 10 requests Per minute
Bet placement 30 requests Per minute
Payments 10 requests Per minute

Rate limit headers in response:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1706000060

Error Codes

See the complete list of error codes:

Error Codes Reference →

Related Pages