GAMITY SPACE DOCS

API Documentation

Welcome to the GAMITY SPACE TECHNOLOGY API. Our platform provides hyper-fast, zero-latency realtime synchronization for lottery datasets including WinGo, K3, 5D, TRX WinGo, and MotoRacing.

The API operates via standard HTTP GET requests, returning JSON structurally equivalent to downstream source data to natively bridge with your own game servers.

Domain Whitelisting (Backend Usage)

If you have configured a Domain Whitelist under your account, our API strictly enforces origin matching. Browsers handle this automatically via CORS.

However, if you are fetching the API from a backend server script (e.g., cURL, Node.js or PHP), you MUST explicitly inject a valid Origin or Referer header mapping to your whitelisted domain natively.

CURL / SERVER Origin Header Requirement
curl -H "X-API-Key: YOUR_KEY" \
     -H "Origin: https://yourwebsite.com" \
     http://localhost:3000/api/v1/wingo/1m

Authentication

Every request requires an active API key to be passed within the headers. If absent or invalid, the request returns a 401 Unauthorized block.

HEADER Authorization: Bearer <YOUR_API_KEY>
{
  "Authorization": "Bearer 8fecb3a... (your 32 character key)"
}

You can regenerate your API keys simultaneously from the User Dashboard.

Rate Limits & Response Formats

All endpoints enforce a sliding-window rate limit metric explicitly tracked via IP and API Key. The exact allowance is customizable per account within your subscription profile (defaults ordinarily sit at 60/minute).

Universal Response Schema

Every valid endpoint executes an outer envelope wrapping the lottery dataset to ensure standardized parsing arrays:

{
  "success": true,
  "data": { ... payload object ... }
}

Error Response

{
  "success": false,
  "message": "Invalid API Key or unauthorized access to this game type."
}

Webhooks (Push API)

Instead of constantly polling our endpoints, you can configure a Webhook URL in your dashboard to receive instantaneous pushes whenever a game period updates. This guarantees zero-latency delivery with minimal server load.

POST Your Configured Webhook URL

Your server will receive an HTTP POST request with the following JSON payload payload. The structure exactly mimics a standard API response:

{
  "event": "period_change",
  "game_key": "wingo_1m",
  "game_type": "wingo",
  "timestamp": 1776606842123,
  "data": {
    "type": "update",
    "key": "wingo_1m",
    "gameCode": "WinGo_1M",
    "gameType": "wingo",
    "current": {
      "issueNumber": "20260419100010896",
      "endTime": 1776179617867,
      ...
    },
    "history": { ... }
  }
}
  • Request Header: X-Webhook-Event: period_change
  • Request Header: Content-Type: application/json
  • Pushes are sent as "fire-and-forget" with a 3-second timeout. Ensure your endpoint responds quickly.

System Status

Check the overall health and synchronization status of the platform.

GET /api/v1/status
{
  "success": true,
  "service": "GAMITY SPACE TECHNOLOGY API",
  "version": "1.0.0",
  "server_time": 1776622305126,
  "endpoints_available": 14
}

WinGo Classic Color Options

The traditional WinGo game operates on colors mapping (0-9) against strict interval windows (30s, 1m, 3m, 5m). Numbers correspond dynamically to Red, Green, and Violet.

GET /api/v1/wingo/1m

Available Intervals: 30s, 1m, 3m, 5m

{
  "success": true,
  "data": {
    "current": {
      "issueNumber": "20260419100010896",
      "endTime": 1776179617867,
      "interval": "1M"
    },
    "history": {
      "list": [
        {
          "issueNumber": "20260419100010895",
          "number": "4",
          "color": "red",
          "premium": "4",
          "sum": 0
        }
      ]
    }
  }
}
  • number ranges from 0-9.
  • color defines winning elements (e.g. red, green, or red,violet).

TRX WinGo Blockchain Hash

TRX WinGo pulls cryptographic blockchain transactions matching realtime TRON nodes. The hash suffix directly calculates the exact outcome.

GET /api/v1/trxwingo/1m

Available Intervals: 1m

{
  "success": true,
  "data": {
    "current": { "issueNumber": "...", "endTime": 176... },
    "history": {
      "list": [
        {
          "issueNumber": "20260419103010896",
          "number": "7",
          "color": "green",
          "premium": "7",
          "sum": 7,
          "blockId": "0000000004e2edf5abdcc202d258bb8e0384b2b1c2033d33ebd6...",
          "blockNumber": 81980917,
          "blockTimestamp": 1776610554000
        }
      ]
    }
  }
}
  • blockId is the full immutable TRON hash string.
  • blockNumber represents the physical node verification sequence.

K3 Dice Engine

K3 utilizes three independent dice. The resulting dataset outputs a squashed string representing the physical dice faces.

GET /api/v1/k3/1m

Available Intervals: 1m, 3m, 5m, 10m

{
  "success": true,
  "data": {
    "current": { "issueNumber": "...", "endTime": ... },
    "history": {
      "list": [
        {
          "issueNumber": "20260419101010905",
          "number": "",
          "color": "",
          "premium": "165",
          "sum": 12
        }
      ]
    }
  }
}
  • premium dictates the exact die orientation. "165" forces three dice: 1, 6, and 5. Parse this strictly via native math splitting (i.e., array splitting by character).
  • sum is pre-calculated algorithmically. 1 + 6 + 5 = 12.

5D Multi-Ball

Similar mathematically to K3, 5D generates a massive 5-character string representing 5 independent drawing balls. It must be dynamically parsed.

GET /api/v1/5d/1m

Available Intervals: 1m, 3m, 5m, 10m

{
  "success": true,
  "data": {
    "history": {
      "list": [
        {
          "issueNumber": "20260419102010906",
          "number": "",
          "color": "",
          "premium": "91221",
          "sum": 15
        }
      ]
    }
  }
}
  • premium: "91221" represents exactly five sequential balls: Ball₁=9, Ball₂=1, Ball₃=2, Ball₄=2, Ball₅=1.

MotoRacing Track Data

MotoRacing governs algorithmic vehicle finishes across 10 positional parameters. Values are strictly comma-separated tracking identifiers.

GET /api/v1/motoracing/1m

Available Intervals: 1m

{
  "success": true,
  "data": {
    "history": {
      "list": [
        {
          "issueNumber": "20260419104010901",
          "number": "",
          "color": "",
          "premium": "3,1,9,4,10,7,8,6,2,5",
          "sum": 0
        }
      ]
    }
  }
}
  • premium outputs positional ranks recursively. The first index is 1st Place (e.g. Car #3), the tenth index is Last Place (e.g. Car #5).