Product · Exchange
Diamond exchange API for back, lay and cricket markets
The Diamond exchange API is back and lay betting for operators whose licence allows it. One side backs an outcome, the other lays it, on cricket markets such as match odds, bookmaker and fancy.
{
"event": "IND v AUS · 2nd ODI",
"market": "match_odds",
"runners": [
{ "name": "India", "back": 1.84, "lay": 1.86 },
{ "name": "Australia", "back": 2.14, "lay": 2.18 }
],
"status": "in_play"
}Back lay API
Backing and laying in plain terms
A back lay API has to reserve liability, not just the stake, when a player lays. That is the biggest wallet difference from a sportsbook.
Back
- You bet that an outcome will happen
- Stake at risk; profit = stake × (price − 1)
- The same thing as a normal bookmaker bet
Lay
- You bet that an outcome will not happen
- Liability at risk = stake × (price − 1)
- You act as the bookmaker for that bet
Cricket exchange markets
Match odds
Back or lay the match winner throughout the game. This is the deepest market on any cricket exchange API.
Bookmaker market
Fixed-odds style prices offered alongside the exchange, often with faster settlement and lower minimums.
Fancy markets
Session runs, player runs and over-based lines. These are what Diamond sports players expect during an innings.
Where exchange prices come from
Liability on a lay is reserved until the market settles, on the same wallet as the rest of the account. The fast card games, including 32 Cards and Lucky 7, are the Diamond casino API.
Operators often ask whether an exchange betting API is the same as the Betfair exchange API. It is not. Betfair runs its own exchange and API for its own customers. Exchange-style products in this market may reference prices seen on large exchanges, run their own matching, or combine the two. Turnkeyxgaming is not affiliated with Betfair. Ask how prices and liquidity are sourced for your account before you plan marketing around them.
For product teams, the betting exchange API and the Diamond sports API cover the same ground: events, markets, prices, bet placement and settlement. Settlement uses the seamless wallet, with liability reserved on lay bets until the market settles.
Market Specifications
Exchange market types, pricing mechanisms, and settlement rules
| Market Type | Pricing Format | Bet Types Allowed | Liability Mechanics | Settlement Trigger |
|---|---|---|---|---|
| Match Odds | Decimal (e.g., 1.85 / 1.87) | Back & Lay | Lay liability = Stake × (Odds − 1) | Official match result announcement |
| Bookmaker Market | Percentage-based or fixed odds | Back & Lay with zero commission | Immediate balance lock per runner | Ball-by-ball or post-match adjudication |
| Fancy Markets / Session | Runs line (e.g., 48/50 Yes/No) | Yes / No (Back / Lay equivalents) | Fixed payout liability based on line stake | Completion of specified over (e.g., 6th over end) |
| Player / Khado Markets | Individual batsman runs / boundaries | Over / Under runs | Locked liability on under selections | Batsman dismissal or innings close |
| Tied Match / DLS Scenarios | Super Over / Boundary Count rules | Market-specific void terms | Automatic rollback on abandoned matches | Official tournament match referee ruling |
Risk Management
Exchange risk management and wallet ledger requirements
Managing peer-to-peer and liquidity-backed exchange markets requires stringent transaction sequencing on your wallet:
- Atomic liability reservation: wallet debit must immediately lock potential lay loss without debiting cash outright
- Automated unmatched bet cancellation and balance release upon market closure or match abandonment
- Real-time suspension rules you configure, triggered by a wicket, a boundary or a video review, applied before the next bet is accepted
- Synchronisation with the live data feed the exchange uses, so a suspension is applied when the feed reports the event
- Commission extraction calculated exclusively on net market winnings rather than total turnover
Licensing and jurisdictional compliance
Exchange and peer-to-peer wagering is subject to specialized licensing frameworks in regulated jurisdictions. Operating back/lay markets requires distinct sports betting authorizations separate from standard online casino RNG certificates. Turnkeyxgaming supplies exchange feeds strictly to licensed operators permitted to offer these products in their target territories.
Adding an exchange to a casino brand, in order
The sequence matters more here than on a casino launch, because the wallet does something new: reserving liability rather than committing a stake.
- 01Week 0
Licence first
Confirm in writing that your licence permits exchange-style wagering in each target territory. A casino approval does not automatically cover a back-and-lay product.
- 02First days of integration
Wallet reservation test
Build and test the liability reservation: place a lay, check the reserved figure, void the market, check the release. The transaction id must be idempotent so a retry cannot reserve twice.
- 03Same week
Suspension wiring
Suspend on wickets and reviews using the market state, and test that a stake arriving during suspension is refused rather than queued.
- 04Before open beta
Commission configuration
Decide commission on net market winnings, configure it, and check that a hedged player's history shows the netting correctly.
- 05Launch week
Support training
Write the three dispute scripts before launch: unmatched at suspension, fancy line void, correction after settlement. Support answers from records, not instincts.
A fancy line on the exchange, in wallet numbers
A player backs the yes side of a 50-run line on the sixth over for 1,000 at even money. The wallet reserves 1,000, because that is the most the player can lose. If the over completes on 53 runs, the bet wins and 1,000 profit is credited when the market settles. If the over is interrupted at four balls and the market's void rule applies, the reservation is released in full: no profit, no loss, and the ledger shows the release against the same transaction id.
The failure case every operator should rehearse: the same bet placed two seconds before a wicket, the market suspended mid-flight, the order unmatched at suspension. The correct behaviour is a cancellation event that releases the reservation and tells the player why. The fancy market void note covers the settlement side; this page's job is that the money side never locks balance the player has not actually risked.
Support scenarios on an exchange, and the record that answers each
| Player says | The record that answers it | Correct outcome |
|---|---|---|
| My lay bet vanished at the wicket | The suspension timestamp, the order state and the cancellation event | Unmatched order cancelled, reservation released |
| The fancy line should have won | The ball log, the line definition and the void rule | Settle per the published rule, even if the player disagrees |
| You took my liability twice | The transaction ids and their idempotency keys | One reservation only; a duplicate is a bug to fix, not a policy |
| The result changed after I was paid | The result file versions, both retained | The corrected result governs; adjust the ledger visibly |
| I laid with no balance | The reservation check on the order | Impossible: the lay is refused without cover |
FAQ
Questions operators ask
Can I offer Diamond casino games inside the exchange?
Yes. The Diamond casino API titles share the same unified seamless wallet, enabling players to rotate between cricket exchange betting and short card games like 32 Cards without moving funds.
Do you provide live cricket scores for the exchange?
Scorecards, ball-by-ball animations, and live video stream widgets are covered on the cricket score API page.
How does the wallet handle unmatched lay bets?
When a player places an unmatched lay order, your ledger temporarily reserves the maximum liability. If the bet remains unmatched when the market enters in-play or closes, an automated cancellation event releases the reserved liability back to the player's spendable balance.
Is commission calculated per bet or per market?
Industry standard exchange operations calculate commission exclusively on net profit per event market. If a player backs both sides or trades out green on an event, commission is deducted only from the net positive balance.
Can a player act as the house and just lay everything?
They can lay any selection the market offers, within their balance, because the liability is reserved in full. What they cannot do is lay without cover. The reservation is the product's risk boundary, not a courtesy.
Is the bookmaker market on Diamond an exchange market?
No. It is fixed-odds pricing offered beside the exchange, settled faster and without lay liability. Both sit in the same product, but the wallet treats them differently and your copy should too.
What happens to open liability if the platform restarts mid-match?
Reservations persist against transaction ids and are reconciled on recovery. This is one of the tests in onboarding: place lays, restart, confirm the reserved figures survive and settle correctly.
References
Sources and further reading
Primary regulator, standards or studio documentation behind the technical and regulatory points on this page. External links open in a new tab. Links checked 2026-11-15.
- Betfair API documentation
Exchange pricing, lay liability and settlement behaviour.
developer.betfair.com
- UK Gambling Commission
Remote gambling and software technical standards.
www.gamblingcommission.gov.uk
Keep reading
Related pages
- Product · Diamond casinoDiamond casino32 Cards, Lucky 7, Worli Matka and teen patti-style rounds in RNG and live formats, settling as short card games on one wallet.Read
- Product · Cricket scoresCricket scoresA cricket scoreboard iframe and widget for exchange pages, with ball-by-ball detail where the data licence allows display.Read
- Product · SportsbookSportsbookAdd pre-match, in-play, esports and virtual sport as a wallet iframe, or take the odds feed and build a betslip your traders run.Read
- Region · AsiaAsiaLicensed Asian lobbies: baccarat-led tables, regional slots and teen patti, at 13% of GGR. Availability is confirmed per licence.Read
Get a written quote and sandbox access
Tell us your licence, target markets and products. You get the GGR rate in writing, the studio list for your markets and sandbox credentials.