TerminalExecutionOdds337ToolsContact
    DocsLog in
    1. Home
    2. Guides
    3. Betting tools and software in Australia: what each does and what to check
    4. Bet placement API reliability checklist

    Bet placement API reliability checklist

    A bet placement API checklist: stop duplicate bets after timeouts, reconcile with bookmaker history, handle partial and refused bets, test first, guard keys.

    By the B337 team. Last updated 7 October 2026.

    The short answer

    • A bet placement API sends bets from your code into accounts you hold, and needs six safeguards: no blind resends, reconciliation, handling for partial and refused bets, signed callbacks, a dry run and a guarded key.
    • A timeout means no answer arrived, not that the bet failed: resending a $40 bet every 5 seconds for 30 seconds can put 7 copies, $280, at risk.
    • Match every bet with the bookmaker's own history on price, stake, time and status, and stop sending bets at the first mismatch you cannot explain.
    • A bookmaker can take part of a stake, take it at another price or refuse it, so record what was accepted and never retry the rest into a duplicate.
    • Keep the API key in server-side code or an environment variable, never in a browser, a repository or a shared document: anyone holding it can send bets.

    On this page

    1. A timeout is not a failure: duplicates and idempotency
    2. Reconcile every bet with the bookmaker's bet history
    3. Partial acceptance, price changes and refusals
    4. Results by signed callback or by polling
    5. Demo keys and a dry run before live money
    6. API keys: where they live and who can send bets
    7. Volume, bookmaker terms and when not to automate

    A bet placement API takes a bet your code sends, places it in a bookmaker account you hold and reports back what happened. Before it touches real money, check six things: the timeout path, reconciliation with the bookmaker's records, the handling of part-accepted and refused bets, callback signatures, a full run on a demo key, and who can reach the key.

    These checks are about bet execution, getting a bet accepted at a price you will take, and they apply to any API that bets in your own accounts, whoever built it. Placing bets programmatically fails in ways a price feed cannot: a lost reply can become two bets, and a bet can come back smaller than you sent it. Among the betting tools in Australia, this is the one where a software mistake becomes a bet.

    A timeout is not a failure: duplicates and idempotency

    A timeout means no answer arrived in time. It does not mean the bet failed: the bookmaker may have accepted it a moment after your code stopped waiting. Code that resends on a timeout can place the same bet twice, and code that retries in a loop can place it many times. With illustrative figures, a $40 bet at $2.60 resent every 5 seconds for 30 seconds is 7 sends:

    If every send is acceptedOne bet, as intendedSeven bets, after blind retries
    Staked$407 x $40 = $280
    Lost if it loses$40$280
    Profit if it wins40 x (2.60 - 1) = $647 x $64 = $448

    The bigger win is no consolation: the extra $448 - $64 = $384 is profit on $240 of stake your plan never allowed, and the same retries make every loss seven times as large.

    The standard defence is an idempotency reference: a unique id your code creates for each bet decision before the first send, stores, and sends again unchanged with any resend. An API that supports one treats a second send with the same reference as the same bet and returns the first result instead of placing it again. Whether an API supports this is something its documentation has to say plainly. If it does not, treat every send as a new bet.

    After a timeout, then:

    1. Mark the bet as unknown, and send nothing more for that selection.
    2. Ask the API for the bet's status, by your reference or the id it returned, if it offers a status call.
    3. Check the bookmaker's own bet history for a bet with that selection, stake and time.
    4. If the bet is there, record it as placed. If it is not, and the API's stated window for a late result has passed, decide again at the current price, as a new bet with a new reference.

    Reconcile every bet with the bookmaker's bet history

    Your records and the bookmaker's bet history should agree on every bet: the bookmaker's bet id, the selection, the price taken, the stake accepted, the time and the status. Match on the bet id first, and where there is none, on selection and stake within a short window such as two minutes. Treat any mismatch you cannot explain as a reason to stop. With illustrative records from one afternoon:

    Your recordBookmaker's bet historyWhat it meansWhat to do
    Placed, $60 at $2.75$60 at $2.75A matchNothing
    Placed, $60 at $2.75$60 at $2.90The bet went on above your floor, and your record kept the floor you sentRecord the price taken from the receipt, not the price sent
    Placed, $120 at $1.95$45 at $1.95Partly accepted, recorded as fullCorrect the stake: your exposure was overstated by $75
    Refused$35 at $4.40, 2:41 pmA bet you believe failed is openStop: a resend would have doubled it
    No record$35 at $8.00, 3:12 pmA bet your code never sent, or never recordedStop: look for a duplicate, then for a key in the wrong hands

    Stopping means every session at once, which is the job of a kill switch, and nothing restarts until each mismatch has a cause.

    Check monthly totals as well. Measure 7 of the National Consumer Protection Framework, in force since 31 July 2022, requires online wagering providers to send active customers a monthly activity statement, which lists the number of bets and the net result among other figures. For example, if your records show 212 bets and a net result of -$84.50 for the month, and the statement shows 214 bets and -$124.50, then two bets and $40 of losses are missing from your code's view. Find them before you bet again.

    Partial acceptance, price changes and refusals

    A bet sent is not a bet placed. Besides taking the whole stake at your price, a bookmaker can take part of the stake, take it at another price, or refuse it. The market may be suspended, the stake may be over its limit for your account, or the price may have moved. The price can shift in the seconds between your decision and the bet's arrival, which is betting latency at work, and the price floor you send with each bet decides whether a moved price is still acceptable.

    Partial acceptance is written into at least one racing body's rules. Since 1 July 2025, Racing Queensland's conditions have made off-course operators accept part of a fixed-odds bet on a Queensland race, up to the minimum bet limit, instead of turning the whole bet away. The same update lets punters use automation to select a market and add it to the bet slip, but says this change does not oblige an operator to accept a bet completed by automation. Minimum bet limits explained covers the rule itself.

    With illustrative figures, your code sends $150 with a $3.20 floor, and the bookmaker accepts $60 at $3.25:

    How your code handles itStake in your recordsReturn if it winsWhat goes wrong
    Records what was accepted$6060 x 3.25 = $195.00Nothing
    Records what it sent$150150 x 3.25 = $487.50Your records overstate the return by $292.50
    Resends $150 to finish the jobUp to $60 + $150 = $210Up to 210 x 3.25 = $682.50Up to $210 at risk, against the $150 you planned

    Record what was accepted, never what was sent, and never resend the remainder automatically. If you still want more on, that is a new decision at the current price, with its own reference and inside your limits.

    On the way back, each outcome looks different. A result might carry fields like these (illustrative names, not any one provider's format):

    FieldPlaced in fullPartly acceptedRefused
    StatusPlacedPlacedRefused
    Stake sent$150$150$150
    Stake accepted$150$60$0
    Price taken$3.25$3.25None
    Bookmaker bet idPresentPresentNone
    ReasonNoneStake limitPrice below floor

    Read the accepted stake and the bookmaker's bet id, never the status alone: a partly accepted bet and a full one can carry the same status word.

    Results by signed callback or by polling

    Results come back one of two ways. With polling, your code asks the API for each bet's status until it is final or a deadline passes. With a callback, often called a webhook, the API sends the result to a web address you run as soon as it is ready.

    Polling is simple and survives your own server restarting, but every check is a request against your limits. Space the checks out as the bet ages, and when the deadline passes with no final status, the bet is unknown: follow the timeout steps above.

    A callback is quicker and cheaper, but your callback address is not a secret, and anyone who finds it can post to it. A forged "refused" could make your code resend a bet that was placed, and a forged "placed" could hide one that failed. So check every callback before you trust it:

    1. The API signs each callback, usually with an HMAC: a code computed from the exact body and a secret that only you and the API hold.
    2. Your server computes the same code from the raw body it received and compares the two.
    3. If they differ, or the signature is missing, discard the callback and record nothing.
    4. If the same result arrives twice, act on it once, and expect results to arrive out of order.

    Keep a slow poll running behind the callbacks. If your server is down when a result is sent, polling is how you find out what happened.

    Demo keys and a dry run before live money

    Run the whole flow before any real stake: send bets to a demo key, or against sample responses, that cover every result your code must handle, the bad ones included. A dry run that only ever sees a successful bet tests nothing.

    ScenarioWhat your code must doIt passes if
    Placed in fullRecord the stake and the price takenThe record matches the sample receipt
    Partly acceptedRecord the accepted stake onlyNothing resends the remainder
    Refused below the floorRecord the refusalNo retry at a lower price
    TimeoutMark the bet unknown and checkNo second send
    Callback with a bad signatureDiscard itNothing is recorded
    The same callback twiceAct onceOne record, not two

    Then go live in steps: the smallest stake the bookmaker accepts, a maximum stake per bet, a cap on the day's total, and a floor on every bet. Change any of those limits only after a week in which every bet reconciled, and never beyond what you set out to risk.

    API keys: where they live and who can send bets

    Anyone holding your API key can send bets into your accounts, so treat it like the passwords to those accounts.

    Keep the keyNever put the key
    In server-side code that only you runIn a web page or a browser extension, where anyone can read it
    In an environment variable on that serverIn a repository, private ones included, because the history keeps it after you delete it
    In a password manager, for safekeepingIn a shared document, a chat message or a screenshot

    If a key leaks, replace it at once, stop every session that accepts bets from it, and check each bookmaker's bet history for bets you did not send. A bet in that history with no record on your side, the last row of the reconciliation table, can be the first sign.

    Volume, bookmaker terms and when not to automate

    Automation can bet far more, far faster, than by hand, and an API removes the last pause before each bet. Set a deposit limit with each bookmaker before your code places its first bet. Under measure 6 of the National Consumer Protection Framework every online wagering provider must offer deposit limits, and lowering one takes effect straight away while raising one takes 7 days. Code can only bet what is in the account, so a deposit limit caps the new money a bug can lose.

    Bookmakers' terms decide whether automated bets are welcome, and many restrict automated betting and third-party access. Under those terms an account can have its stakes cut, its bets voided or be closed, and that risk sits with you. Whether automated betting is lawful where you live is a different question, and nothing here is legal advice.

    If you place a handful of bets a week, chosen by eye, placing them by hand in your own account is simpler and safer than any API. A placement API is worth its complexity when your rules are already code and you are ready to reconcile every bet it places.

    B337's own placement API is the Execution API, which sends racing and sports bets from your code to sessions running on your computer, in accounts you hold. That computer has to be on, awake and online for a bet to go on. The betting API page sets out its request format, result flow and limits.

    Risk: Betting involves risk. Code can place bets faster than you can notice a fault, a bet placed exactly as intended can still lose, and many bookmakers restrict automated betting in their terms. See responsible gambling for limits and support.

    For free and confidential support call 1800 858 858 or visit gamblinghelponline.org.au.

    Questions

    How do I place bets programmatically in Australia?
    Your code sends each bet to an API that places it in an account you hold in your own name, then reads back what the bookmaker accepted. Many bookmakers restrict automated betting in their terms, so read them before you start.
    What does bet execution mean?
    Bet execution is getting a bet accepted at a price you will take, as distinct from finding the bet. It covers the floor you send, the stake and price the bookmaker accepts, and the confirmation that comes back.
    What is a webhook in a betting API?
    A webhook is a message the API sends to a web address you run when something happens, such as a bet being placed or refused. Check its signature before acting on it, since anyone who learns the address can send it a fake result.
    Should my code retry a bet that timed out?
    Not until it has checked whether the first attempt went on, through the API's status call and the bookmaker's own bet history, and the API's stated window for a late result has passed. If the bet is still not there, any new attempt is a new decision at the current price, with a new reference.
    Do bookmakers allow an automated bet placement API?
    Each bookmaker's terms decide, and many restrict automated betting and third-party access, so search your bookmaker's terms for automated betting, software and third parties before your code places a bet. Under those terms a bookmaker can limit stakes, void bets or close an account, and whether automation is lawful where you are is a separate legal question.

    Sources

    • National Policy Statement for the National Consumer Protection Framework for online wagering (updated 3 May 2022), Department of Social Services
    • RQ updates minimum bet limits conditions, Racing Queensland

    Related

    • Betting tools and software in Australia: what each does and what to check
    • Betting API
    • Price floor in betting automation
    • Kill switch on a betting bot
    • Latency in betting and odds delay
    • Betting bot risks and the controls that limit each one
    • Betting browser extensions and the permissions they ask for
    • How to choose betting software: twelve questions to ask before you pay
    • Betting syndicates in Australia: how pooled money works and what can go wrong

    Start with a free account

    The API docs are open to read without an account, and a free account opens a limited view of the Terminal with live odds. API access for placing bets is set up through Discord.

    Create free accountSee plansJoin Discord

    Betting involves risk. Bookmakers can restrict or close accounts and void bets, automation can fail, prices move, and a positive expected value (+EV) bet can still lose. Promotions carry each bookmaker's own terms. There is no guarantee of profit. 18+ only. For free and confidential support call 1800 858 858 or visit gamblinghelponline.org.au. See responsible gambling for limits and support.

    Products

    • Terminal
    • Execution API
    • Full Automation

    Guides and tools

    • All guides
    • Betting glossary
    • Betting calculators
    • How betting bots work
    • Arbitrage betting
    • Middle betting
    • Matched betting
    • Betting exchanges
    • Odds types explained
    • Horse racing software
    • Money back racing promos
    • Bonus bet converter
    • Terminal pricing
    • Execution pricing
    • How tokens work

    Company

    • About
    • Security
    • Responsible gambling
    • Contact
    • Terms
    • Privacy

    Think. Is this a bet you really want to place?

    18+ only. For free and confidential support call 1800 858 858 or visit gamblinghelponline.org.au. Self-exclusion: BetStop (betstop.gov.au).

    B337 is software, not a bookmaker or wagering service provider. Bets are placed in accounts you hold with Australian bookmakers. Bookmaker names are trade marks of their owners; B337 is not affiliated with or endorsed by them. Bookmaker terms may restrict automated betting.

    Bet337 © 2026Join our Discord