M
v1.4 · Active
Moto Racing API
Event-based virtual race betting. Backed by a signed-webhook contract, idempotent writes and SLA-tracked uptime.
Latency p95
47ms
Uptime
99.97%
GGR share
14%
Endpoints
POST
/api/public/v1/moto/bet
Place a bet on the current open round.
GET
/api/public/v1/moto/state
Fetch open round + recent settled history.
GET
/api/public/openapi
OpenAPI 3 spec for all endpoints.
Place a bet
POST /api/public/v1/moto/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/moto/bet`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${TOKEN}`,
},
body: JSON.stringify({
duration: 60,
selection_type: "winner",
selection_value: "Falcon",
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"
}