This skill provides two core functions:
English output only. Additional features: exclude by horse number or barrier, single-race fetch (raceNo), 15‑minute caching, and 60‑second rate limiting between fresh API fetches. Advanced scoring includes trainer/jockey bonuses, barrier effectiveness, and weight penalty.
Repository: https://github.com/StevenHo1394/openclaw/tree/main/skills/hk-horse-racing
fetchRaceCard(params)Fetch race card for a given date (default: today in HKT). Includes race details, per-horse win/place odds, and recommendations for each race.
Parameters (object):
date (string, optional): Date in YYYY-MM-DD format. Default: today (HKT).classFilter (array of strings, optional): Filter races by class (e.g., ["Class 4"]).excludeHorseNos (array of numbers, optional): List of horse numbers to exclude from the horses array and from recommendations (e.g., [7]).excludeBarriers (array of numbers, optional): List of barrier numbers to exclude from the horses array and from recommendations (e.g., [7]).raceNo (number, optional): If provided, returns only this specific race. Omit to get all races for the date.advancedScoring (boolean, optional): Enable advanced scoring that includes trainer/jockey bonuses, barrier effectiveness, weight penalty, and light weight bonus. Default: false.tjBonusWeight (number, optional): Weight for trainer/jockey combo bonus when advancedScoring=true. Range 0-0.3. Default: 0.15.barrierBonusWeight (number, optional): Weight for barrier effectiveness bonus when advancedScoring=true. Range 0-0.2. Default: 0.12.newsBoost (boolean, optional): When advancedScoring=true, also include news sentiment boost (stub, not implemented). Default: false.lightWeightBonus (number, optional): Bonus for horses with weight < 120lb when advancedScoring=true. Range 0-0.2. Default: 0.05.formAnalysis\ (boolean, optional): Enable enhanced form analysis — recency-weighted form, trend detection (improving/declining), consistency scoring, last-start win bonus, consistency bonus, improving form bonus, declining form penalty, and debutant handling. Default: false.Returns (object):
{
"meeting": {
"venue": "Happy Valley",
"date": "2026-03-18",
"weather": null,
"trackCondition": "GOOD"
},
"races": [
{
"raceNo": 2,
"distance": 1650,
"class": "Class 4",
"going": "GOOD",
"horses": [
{
"horseNo": 1,
"horseName": "MIGHTY STEED",
"horseId": "HK_2023_J384",
"weight": 135,
"jockey": "Z Purton",
"jockeyAllowance": null,
"trainer": "K W Lui",
"pastRuns": [7,7,3,3,7,1],
"gear": ["CP"],
"winOdds": 3.2,
"placeOdds": 1.5
}
// ... other runners (SB horses excluded)
],
"recommendations": [
{
"horseName": "MIGHTY STEED",
"reason": "Win odds 3.2; barrier 7; weight 135; recent form avg 4.7; gear: CP; TJ bonus +10.0%; Barrier +2.0%",
"winProbability": 17.2
}
// ... up to 4 best horses
]
}
// ...
],
"source": "hkjc-api",
"timestamp": "2026-03-17T17:58:31.793Z"
}
Note: The returned JSON object structure remains the same as previous versions; enabling formAnalysis only affects the internal scoring and the resulting winProbability values in the recommendations.
Notes:
horses list.recommendations are derived from win odds and recent form; only horses with both are considered.advancedScoring=true, additional bonuses may be applied: top jockey + top trainer combo (+tjBonusWeight), barrier effectiveness (+/- depending on distance class), and weight penalty for horses carrying significantly above average weight.(no English name). Chinese names are not used in output.hkjc-api npm package, which will be installed automatically./home/node/.openclaw/workspace/skills/hk-horse-racing/npm install inside that directory to install dependencies. OpenClaw will typically run npm install automatically when the skill is loaded if you set installCommand in the plugin manifest.openclaw configure or agent config.To avoid overloading the HKJC source, the skill enforces a 1-minute cooldown between fresh API fetches. Cached data (within 15 minutes) is served without delay. If you attempt a fresh fetch sooner than 60 seconds after the previous one, the skill throws an error: Rate limit: please wait Xs before fetching new data.
advancedScoring features are experimental and use heuristics; tune tjBonusWeight, barrierBonusWeight, and lightWeightBonus as needed. Weight penalty and light weight bonus apply automatically when advancedScoring=true.If the skill fails to install or run:
node --version).npm install completed without errors (look for hkjc-api in node_modules).tjBonusWeight 0.15, barrierBonusWeight 0.12.lightWeightBonus (default 0.05) to reward horses under 120 lb in advanced scoring.advancedScoring, tjBonusWeight, barrierBonusWeight, newsBoost.This skill is provided for informational purposes only. It does not constitute financial or betting advice. The author makes no guarantees regarding the accuracy, completeness, or timeliness of the data and recommendations. You are solely responsible for any betting decisions and any resulting losses. Use this skill at your own risk.
Author: Steven Ho
License: MIT
共 2 个版本