W
v3.2 · Active

Wingo API

30s / 1m / 3m / 5m color-number rounds. Backed by a signed-webhook contract, idempotent writes and SLA-tracked uptime.

Latency p95
42ms
Uptime
99.99%
GGR share
12%

Endpoints

POST
/api/public/v1/wingo/bet
Place a bet on the current open round.
GET
/api/public/v1/wingo/state
Fetch open round + recent settled history.
GET
/api/public/openapi
OpenAPI 3 spec for all endpoints.

Place a bet

POST /api/public/v1/wingo/bet
// Node 18+ (built-in fetch). Bearer = "<PUBLIC_KEY>:<SECRET>"
import { randomUUID } from "node:crypto";

const BASE = "https://your-domain.example";       // AS Tech base URL
const TOKEN = process.env.ASTECH_TOKEN;            // "pk_xxx:sk_xxx"

const res = await fetch(`${BASE}/api/public/v1/wingo/bet`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${TOKEN}`,
  },
  body: JSON.stringify({
    duration: 60,
    selection_type: "color",
    selection_value: "red",
    stake: 100,
    currency: "USD",
    idempotency_key: randomUUID(),
  }),
});

if (!res.ok) {
  const err = await res.json().catch(() => ({}));
  throw new Error(`Bet failed (${res.status}): ${err.error ?? res.statusText}`);
}

const bet = await res.json();
console.log("Placed bet", bet.bet_id, "round", bet.round_no, "balance", bet.new_balance);

Successful response (201)

{
  "bet_id": "b_01HZ...",
  "round_no": 88210,
  "duration_seconds": 60,
  "locks_at": "2026-06-12T14:36:00.000Z",
  "stake": 100,
  "new_balance": 9900,
  "status": "open"
}