SH

Universal Wager API Documentation

v3.0 REST Specification ยท Base URL: https://skyhighfin.com/api/v1

Cryptographic Authentication Protocol

All mutation requests must include three mandatory HTTP headers. Requests older than 300 seconds are rejected by the S-Sonic Sentinel to prevent replay attacks.

HeaderTypeDescription
x-skyhigh-api-keystringYour publishable studio API key (e.g. sky_live_...)
x-skyhigh-timestampintegerCurrent UTC epoch in seconds (Math.floor(Date.now() / 1000))
x-skyhigh-signaturehex stringHMAC-SHA256 signature of timestamp.JSON_BODY using API Secret

Generating Signatures (Client Libraries)

TypeScript / Node.js
import crypto from 'crypto';

function generateHmacSignature(apiSecret: string, timestamp: number, body: object): string {
  const payload = `${timestamp}.${JSON.stringify(body)}`;
  return crypto.createHmac('sha256', apiSecret).update(payload).digest('hex');
}
Python 3
import hmac
import hashlib
import json

def generate_hmac_signature(api_secret: str, timestamp: int, body: dict) -> str:
    payload = f"{timestamp}.{json.dumps(body, separators=(',', ':'))}".encode('utf-8')
    return hmac.new(api_secret.encode('utf-8'), payload, hashlib.sha256).hexdigest()

Core Endpoints Reference

POST/wager/create
Locks match pot in escrow
POST/wager/settle
Reports winner & disburses pot + rev-share
POST/wager/cancel
Atomic refund for aborted matches
GET/wager/status
Real-time state & ledger receipt query
Energy Care