डेवलपर पोर्टल

डेवलपर पोर्टल / API संदर्भ

अंग्रेज़ी में तकनीकी दस्तावेज़

jackpot-network API  /  API

Report one irrevocable cash wager or obtain its original receipt

POST/api/v1/operator/jackpot-network/bets

Authentication

X-Spilvon-Operator + X-Spilvon-Timestamp + X-Spilvon-Signature

Request body

application/json
bet_idstring · required
player_idstring · required
game_codestring · required
categoryenum · required
slots · table · live · instant · sports · other
countrystring · required
currencystring · required
stakestring · required
fundingenum · required
cash · mixed · bonus · demo
riskenum · required
standard · low · void · blocked
placed_atinteger · required
Financial commitment epoch milliseconds
Schema (resolved)
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "bet_id",
    "player_id",
    "game_code",
    "category",
    "country",
    "currency",
    "stake",
    "funding",
    "risk",
    "placed_at"
  ],
  "properties": {
    "bet_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{1,96}$"
    },
    "player_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{1,96}$"
    },
    "game_code": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{1,96}$"
    },
    "category": {
      "enum": [
        "slots",
        "table",
        "live",
        "instant",
        "sports",
        "other"
      ]
    },
    "country": {
      "type": "string",
      "pattern": "^[A-Z]{2}$"
    },
    "currency": {
      "type": "string",
      "pattern": "^[A-Za-z0-9]{2,8}$"
    },
    "stake": {
      "type": "string",
      "pattern": "^(0|[1-9]\\d{0,17})(\\.\\d{1,8})?$"
    },
    "funding": {
      "enum": [
        "cash",
        "mixed",
        "bonus",
        "demo"
      ]
    },
    "risk": {
      "enum": [
        "standard",
        "low",
        "void",
        "blocked"
      ]
    },
    "placed_at": {
      "type": "integer",
      "format": "int64",
      "description": "Financial commitment epoch milliseconds"
    }
  }
}

Responses

200 Accepted, excluded, retry or conflict result; infrastructure/authentication

Accepted, excluded, retry or conflict result; infrastructure/authentication errors instead use the standard operator error envelope

application/json
bet_idstring · required
statusenum · required
accepted · excluded · retry · conflict
reasonstring
processed_atinteger
contribution_nanostring
fxobject
proofobject
winsarray
Schema (resolved)
JSON Schema
{
  "type": "object",
  "required": [
    "bet_id",
    "status"
  ],
  "properties": {
    "bet_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{1,96}$"
    },
    "status": {
      "enum": [
        "accepted",
        "excluded",
        "retry",
        "conflict"
      ]
    },
    "reason": {
      "type": "string"
    },
    "processed_at": {
      "type": "integer"
    },
    "contribution_nano": {
      "type": "string"
    },
    "fx": {
      "type": "object",
      "required": [
        "usd_rate",
        "decimals",
        "base_scale"
      ]
    },
    "proof": {
      "type": "object",
      "required": [
        "chain",
        "index",
        "root",
        "previous",
        "reveal",
        "fingerprint",
        "stake_nano",
        "random",
        "drops"
      ]
    },
    "wins": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "win_id",
          "tier",
          "tier_no",
          "cycle_no",
          "amount",
          "currency"
        ],
        "properties": {
          "win_id": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "tier_no": {
            "type": "integer"
          },
          "cycle_no": {
            "type": "integer"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        }
      }
    }
  }
}
400 Invalid report

Invalid report

401 Invalid signature, expired signature or replay

Invalid signature, expired signature or replay

403 Not authorised

Not authorised

409 Accepted, excluded, retry or conflict result; infrastructure/authentication

Accepted, excluded, retry or conflict result; infrastructure/authentication errors instead use the standard operator error envelope

application/json
bet_idstring · required
statusenum · required
accepted · excluded · retry · conflict
reasonstring
processed_atinteger
contribution_nanostring
fxobject
proofobject
winsarray
Schema (resolved)
JSON Schema
{
  "type": "object",
  "required": [
    "bet_id",
    "status"
  ],
  "properties": {
    "bet_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{1,96}$"
    },
    "status": {
      "enum": [
        "accepted",
        "excluded",
        "retry",
        "conflict"
      ]
    },
    "reason": {
      "type": "string"
    },
    "processed_at": {
      "type": "integer"
    },
    "contribution_nano": {
      "type": "string"
    },
    "fx": {
      "type": "object",
      "required": [
        "usd_rate",
        "decimals",
        "base_scale"
      ]
    },
    "proof": {
      "type": "object",
      "required": [
        "chain",
        "index",
        "root",
        "previous",
        "reveal",
        "fingerprint",
        "stake_nano",
        "random",
        "drops"
      ]
    },
    "wins": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "win_id",
          "tier",
          "tier_no",
          "cycle_no",
          "amount",
          "currency"
        ],
        "properties": {
          "win_id": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "tier_no": {
            "type": "integer"
          },
          "cycle_no": {
            "type": "integer"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        }
      }
    }
  }
}
429 Operator HTTP or per-item rate limit; back off and sign again

Operator HTTP or per-item rate limit; back off and sign again

503 Accepted, excluded, retry or conflict result; infrastructure/authentication

Accepted, excluded, retry or conflict result; infrastructure/authentication errors instead use the standard operator error envelope

application/json
bet_idstring · required
statusenum · required
accepted · excluded · retry · conflict
reasonstring
processed_atinteger
contribution_nanostring
fxobject
proofobject
winsarray
Schema (resolved)
JSON Schema
{
  "type": "object",
  "required": [
    "bet_id",
    "status"
  ],
  "properties": {
    "bet_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_.:-]{1,96}$"
    },
    "status": {
      "enum": [
        "accepted",
        "excluded",
        "retry",
        "conflict"
      ]
    },
    "reason": {
      "type": "string"
    },
    "processed_at": {
      "type": "integer"
    },
    "contribution_nano": {
      "type": "string"
    },
    "fx": {
      "type": "object",
      "required": [
        "usd_rate",
        "decimals",
        "base_scale"
      ]
    },
    "proof": {
      "type": "object",
      "required": [
        "chain",
        "index",
        "root",
        "previous",
        "reveal",
        "fingerprint",
        "stake_nano",
        "random",
        "drops"
      ]
    },
    "wins": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "win_id",
          "tier",
          "tier_no",
          "cycle_no",
          "amount",
          "currency"
        ],
        "properties": {
          "win_id": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "tier_no": {
            "type": "integer"
          },
          "cycle_no": {
            "type": "integer"
          },
          "amount": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          }
        }
      }
    }
  }
}

Request signing samples

Canonical string and HMAC helpers from the downloadable samples. Wallet callbacks may also use Ed25519; see the wallet signing modes.

Node.js node/spilvon.mjs
Node.js
export const signingString = (ts, method, pathAndQuery, body) => `${ts}.${method.toUpperCase()}.${pathAndQuery}.${body}`;
export const hmacHex = (secret, s) => createHmac("sha256", secret).update(s, "utf8").digest("hex");
Download full sample
Python python/spilvon.py
Python
def signing_string(ts: str, method: str, path_and_query: str, body: str) -> str:
    return f"{ts}.{method.upper()}.{path_and_query}.{body}"


def hmac_hex(secret: str, s: str) -> str:
    return hmac.new(secret.encode(), s.encode("utf-8"), hashlib.sha256).hexdigest()
Download full sample
Go go/main.go
Go
func signingString(ts, method, pathAndQuery, body string) string {
	return ts + "." + strings.ToUpper(method) + "." + pathAndQuery + "." + body
}

func hmacHex(secret, s string) string {
	m := hmac.New(sha256.New, []byte(secret))
	m.Write([]byte(s))
	return hex.EncodeToString(m.Sum(nil))
}
Download full sample · go.mod
PHP php/spilvon.php
PHP
function signing_string(string $ts, string $method, string $pathAndQuery, string $body): string {
    return $ts . '.' . strtoupper($method) . '.' . $pathAndQuery . '.' . $body;
}

function hmac_hex(string $secret, string $s): string {
    return hash_hmac('sha256', $s, $secret);
}
Download full sample

Reviewed, not executed by the sample authors.