Skip to content
Protocolzone Protocolzone

Trading module

Betting automation

The routine bet lifecycle runs itself; people handle the exceptions.

Part of the Ashva module inventory — a multi-tenant tote and fixed-odds betting platform we built and operate. The engineering practice behind it is our platform build and integration service line.

Most of the bet lifecycle is deterministic. Markets should open when the fields are published, suspend when a runner is scratched, close at the jump, and settle when the results are official. Where operators lose money and goodwill is in the exceptions, and in the manual work that exceptions generate when the routine path is also manual.

This module automates the deterministic parts so the exceptions get attention.

Lifecycle triggers

Market state changes on schedule and on event. A scratching suspends the affected markets and triggers the refund and re-settlement path. A delayed start moves the close. An abandoned meeting voids and refunds rather than leaving markets open against an event that will not run. Manual control remains available; it is the exception path, not the operating model.

Settlement is a ledger problem

Resulting reads official results and amendment feeds. Settlement writes to the ledger as a transaction set per bet, so a customer’s balance movement can be traced to the specific bet, leg and dividend that caused it. Netting settlements into a single balance adjustment is faster to build and impossible to defend when it is queried.

The cases that break naive systems

Dead heats, protests that reverse a placing after payouts have run, late scratchings after a market has traded, and combination bets with a leg affected by any of the above. Each is handled as a defined case with re-settlement, including reversal of amounts already paid, and each leaves an audit trail rather than a corrected figure.

Automation needs to fail loudly

Every scheduled job has monitoring and a defined behaviour when its input is late or missing. A resulting job that silently does nothing because a feed did not arrive is worse than one that stops and raises an alert to the Operations Desk.

What this module does not do

It does not price and it does not set limits. It executes the lifecycle against the prices from the odds module and the rules from the risk module.

Module facts

Module group
Trading
Tenancy
Tenant-aware
Bet types
Fixed odds, Tote, Pari-mutuel, Exotics, Multi, Starting price, Same-race multi
Codes and verticals
Thoroughbred, Harness, Greyhound, Sports

Integration surfaces

  • Official results and amendment feeds
  • Fields, scratchings and jump times from the schedule module
  • Tote pool dividends for tote and exotic settlement
  • Ledger for settlement, refund and adjustment postings
  • Risk module for referral routing and limit evaluation

Capabilities

What betting automation actually does.

Market lifecycle automation

Markets open, suspend and close on schedule and on event triggers: scratchings, late field changes, jump time and delayed starts. Manual intervention is available but is not the normal path.

Rules-based acceptance

Bet acceptance driven by configured rules rather than a trader watching a queue, with everything the rules will not resolve routed to referral.

Resulting and settlement

Automated resulting from official results, with settlement written to the ledger as an auditable transaction set per bet rather than a net adjustment.

Amendments and adjustments

Dead heats, late scratchings and refunds, protests and reversed placings handled as first-class cases, including re-settlement of bets already paid and of multi legs that depended on them.

Scheduled operational jobs

Market generation for upcoming meetings, price refreshes, end-of-day reconciliation runs and expiry of unresolved referrals, each with monitoring and a defined failure behaviour.

Other trading modules

  • Odds and probs

    Price from a probability you can inspect, not from a number with no parent.

Working on this problem yourself?

We will go through how this module handles it, what it deliberately does not do, and where we would make a different call today.