Skip to main content
A network can drop the answer to a placement after the order was placed. Without a way to retry safely, you would have to choose between missing an order and placing it twice. clientOrderId removes that choice.

The rule

Every order carries a clientOrderId that you choose: 1 to 200 characters, unique on your account. Use an identifier from your own system, or a UUID you generate before the first attempt. The terms are the selection, the bookmakers, the stake, minPrice, acceptBetterOdds, acceptPartialStake and expiresAt. A resent request matches when they are equal; mode must be "place" both times. Previews store nothing, so a clientOrderId used only in previews is still free.

Retrying

Retry with the same body, never with a new clientOrderId:
  • Timeout or dropped connection. Resend the request. You get the order if it was placed, or it is placed now.
  • 502 UPSTREAM_UNAVAILABLE. The bookmaker gateway did not answer, and the order may exist. Resend the request: it returns the order if it was recorded.
  • 409 PREVIOUS_ATTEMPT_UNRESOLVED. An earlier attempt with this clientOrderId is still being resolved with the bookmaker. Wait a few seconds and resend.
  • 5xx in general. Resend with backoff.
  • 4xx other than the above. The request itself is wrong: fix it before you send it again.

Reading an order by your identifier

You can also look the order up without placing anything:
It answers 404 NOT_FOUND when no order was recorded with this identifier.