API Reference
Retrieve normalized transaction history including settled bets, pending bets, and account activity.
Base URL: https://api.b337.ai
POST /v3/transactionsuses the same async contract as/v3/place_bet: an HTTP 200 response in ~100ms withstatus: "pending"and acorrelation_id, then poll/api/bet_status(or receive a signed webhook atcallback_url) for the actual transaction list. The legacyGET /v2/transactionsnow returns 410 Gone.
POST /v3/transactions| Field | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Active session ID |
days_back | int | No | Number of days of history. Default 7. Must be > 0 |
limit | int | No | Maximum transactions to return. Default 50. Must be > 0 |
callback_url | string | No | If set, the result is POSTed to this URL when ready. Must be http(s) (400 otherwise) and resolve to public IPs only - a private host is refused at delivery; redirects are not followed. If absent, poll for the result. |
Standard v3 pending envelope (sandbox samples return 202):
Retrieve the result by polling POST /api/bet_status with the
correlation_id, or via webhook if you passed callback_url. Signature
verification, retry behaviour, and status values are identical to every
other v3 endpoint - see the
Async API (v3) guide.
The polling endpoint
/api/bet_statusworks for anycorrelation_id- place_bet, withdraw-balance, price_check, transactions.
Bodies are {"detail": "..."}. 400 - session_id is required,
days_back and limit must be integers, days_back must be positive,
limit must be positive, bad callback_url, or Session has no PC ID;
403 - Session is not active (not yours / not on the api strategy);
404 - session not found; 503 - your client PC is offline. A bookie-side
failure arrives in result as success: false with an error string.
result payloadThe result field on the poll response (and the webhook body) carries
the normalised history. Each bookie fills the fields it has; the richest
rows (TAB, Sportsbet, bet365, Unibet) look like this:
| Field | Type | Description |
|---|---|---|
| id | string | Bookie's transaction/bet ID |
| type | string | Transaction type ("bet", "deposit", "withdrawal", "bonus") |
| timestamp | string | When the transaction happened (some bookies send date instead) |
| status | string | See Status values |
| stake | float | Amount wagered |
| odds | float | Odds (null when unknown) |
| pnl | float | Profit/loss (winnings - stake; 0 unless won/lost) |
| winnings | float | Total return including stake |
| bet_type | string | win, place, each_way, multi, … |
| is_bonus_bet | bool | Whether a bonus bet was used |
| description | string | Bookie's bet description (some bookies) |
| selections | array | Array of selection objects (some bookies) |
Field coverage varies by bookie: every row has id, status, stake,
odds, pnl; a few bookies return a flat row with description and date
instead of selections and timestamp.
| Field | Type | Description |
|---|---|---|
| event | string | Event name (e.g., "Flemington R3") |
| selection | string | Selection name (runner, team, etc.) |
| odds | float | Odds for this selection |
| result | string | null | Leg result as the bookie reports it |
result)| Field | Type | Description |
|---|---|---|
| success | bool | Whether the request succeeded |
| transactions | array | Array of transaction objects |
| total_count | int | Number of transactions in this response (not a grand total) |
| has_more | bool | Whether more transactions exist beyond limit |
| Status | Description |
|---|---|
won | Bet won - pnl is positive |
lost | Bet lost - pnl is negative (or 0 for bonus bets) |
pending | Bet not yet settled |
refunded | Bet was voided/refunded - pnl 0 |
cashed_out (cashed_out_win / _lose / _neutral on Sportsbet) | Bet was cashed out early |
A few bookies also report void, rejected, cancelled, deposit or
withdrawal; treat any unlisted value as non-bet / no P&L.
GET /v2/transactions was removed on 2026-05-20 and returns 410 Gone
with a Link: </v3/transactions>; rel="successor-version" header and:
Use POST /v3/transactions: params move from the query
string to the JSON body.