Skip to content
sb
Developer Portal

SquiBet API

Build on top of SquiBet. Access sports odds, place bets, manage wallets, and integrate provably-fair casino games with a single REST API.

API Overview

Everything you need to know before making your first request.

Base URL

https://api.squibet.com/api/v1

Authentication

JWT Bearer Token

Rate Limits

100 req/min (standard) · 500 req/min (premium)

Format

JSON request & response bodies

Quick Start

Authenticate and fetch live odds in two requests.

1. Authenticate

curl -X POST https://api.squibet.com/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "your-password"
  }'

# Response
{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOiJIUzI1NiIs...",
    "refreshToken": "dGhpcyBpcyBhIHJlZnJl...",
    "expiresIn": 900
  }
}

2. Fetch Live Odds

curl https://api.squibet.com/api/v1/odds/evt_abc123 \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."

# Response
{
  "success": true,
  "data": {
    "eventId": "evt_abc123",
    "markets": [
      {
        "name": "Moneyline",
        "selections": [
          { "name": "Team A", "odds": 1.85 },
          { "name": "Team B", "odds": 2.10 }
        ]
      }
    ]
  }
}

Endpoint Categories

Explore the full API surface organised by domain.

Authentication

Register, log in, and manage sessions with JWT tokens.

  • POST/auth/register
  • POST/auth/login
  • POST/auth/refresh
  • POST/auth/2fa/verify

Sports & Odds

Browse sports, competitions, events, and real-time odds.

  • GET/sports
  • GET/events
  • GET/odds/:eventId
  • GET/events/:id/markets

Betting

Place single and parlay bets, check status, and cash out.

  • POST/bets
  • GET/bets/:id
  • POST/bets/:id/cashout
  • GET/bets/history

Casino

Discover games, play rounds, and verify provably-fair results.

  • GET/casino/games
  • POST/casino/rounds
  • GET/casino/verify/:roundId
  • GET/casino/games/:slug

Wallet

Manage balances, generate deposit addresses, and withdraw.

  • GET/wallets
  • POST/wallets/deposit
  • POST/wallets/withdraw
  • POST/wallets/swap

User Account

View and update profile, preferences, and security settings.

  • GET/users/profile
  • PUT/users/profile
  • PUT/users/settings
  • GET/users/notifications

Response Format

All responses share a consistent envelope. Check the success field to determine the outcome.

Success Response

{
  "success": true,
  "data": {
    "id": "bet_7f3a...",
    "status": "pending",
    "amount": "0.005",
    "currency": "BTC",
    "potentialPayout": "0.00925"
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "INVALID_TOKEN",
    "message": "The access token has expired. Please refresh your token.",
    "status": 401
  }
}

Error Codes

Standard HTTP status codes used across all endpoints.

CodeNameDescription
400Bad RequestThe request body or query parameters are invalid.
401UnauthorizedMissing or expired JWT token. Re-authenticate and retry.
403ForbiddenYou do not have permission to access this resource.
404Not FoundThe requested resource does not exist.
429Too Many RequestsRate limit exceeded. Back off and retry after the Retry-After header.
500Internal Server ErrorAn unexpected error occurred. Contact support if it persists.

WebSocket (Real-time)

SquiBet uses Socket.IO for live data. Connect once and subscribe to the channels you need.

import { io } from "socket.io-client";

const socket = io("wss://api.squibet.com", {
  auth: { token: "eyJhbGciOiJIUzI1NiIs..." },
  transports: ["websocket"],
});

// Subscribe to live odds for an event
socket.emit("subscribe", { channel: "odds:update", eventId: "evt_abc123" });

socket.on("odds:update", (data) => {
  console.log("New odds:", data);
});
EventDescription
odds:updateReal-time odds changes for subscribed events.
bet:settledNotification when your bet is settled (won/lost/void).
crash:tickLive crash multiplier ticks during an active round.
livefeed:betGlobal live bet feed across the platform.
notificationPersonal notifications (deposit confirmed, VIP level-up, etc.).

SDKs & Libraries

Official client libraries to accelerate your integration.

JavaScript / TypeScript

Fully typed SDK for Node.js and browser environments. Includes WebSocket helpers for live odds.

npm install @squibet/sdk

import { SquiBet } from "@squibet/sdk";

const client = new SquiBet({
  apiKey: "sk_live_...",
});

const odds = await client.odds.getByEvent("evt_abc123");

Python

Python SDK for server-side integrations. Async-first with httpx under the hood.

pip install squibet

from squibet import SquiBetClient

client = SquiBetClient(api_key="sk_live_...")

odds = client.odds.get_by_event("evt_abc123")

Coming soon — join the waitlist

API Key Management

Generate and manage API keys from your account dashboard.

Generate Keys

Navigate to Account Settings → API Keys to create new keys. Each key has a name, optional IP whitelist, and expiration date.

Permissions

Scope each key to specific actions: read-only, betting, wallet operations, or full access. Follow the principle of least privilege.

Rate Limit Tiers

Standard: 100 req/min. Premium: 500 req/min. Enterprise: Custom limits. Upgrade via account settings.

Authentication

All authenticated requests must include a valid JWT token or API key in the Authorization header.

Bearer Token (JWT)

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

API Key

Authorization: Bearer sk_live_a1b2c3d4e5f6...

Keep your keys secret

Never expose API keys in client-side code or public repositories. Use environment variables on the server and rotate keys regularly.

Pagination

List endpoints return paginated results. Use cursor-based or offset-based pagination.

Request

GET /api/v1/bets/history?page=2&limit=25

# Query Parameters
# page   - Page number (default: 1)
# limit  - Items per page (default: 20, max: 100)
# sort   - Sort field (e.g., createdAt)
# order  - asc | desc (default: desc)

Response Metadata

{
  "success": true,
  "data": [ ... ],
  "meta": {
    "page": 2,
    "limit": 25,
    "total": 312,
    "totalPages": 13,
    "hasNext": true,
    "hasPrev": true
  }
}

Versioning & Changelog

The API is versioned via the URL path. Breaking changes are introduced under a new version.

v1 (current)

Stable release

Full coverage of sports betting, casino, wallet, and account management endpoints. All new non-breaking features are added to v1.

v2 (planned)

Next generation

GraphQL support, expanded market types, and enhanced streaming APIs. Estimated availability: Q4 2026.

Support & Community

Get help from the SquiBet developer team and community.

Discord

Join #dev-support for real-time help

Status Page

status.squibet.com