Skip to content

3.4 Trade Summary API

http
GET /api/v1/exchange/report/trade-summary

Query exchange trade summary statistics for all players under the current agent within a given time range (covering three categories: valid, void, and unsettled). Data may lag by a few seconds; the most recent 6 months are retained. Requests must include the HMAC authentication headers.

TIP

This API is rate-limited to 100 requests / minute (per api_key); exceeding it returns code:10060.

The agent dimension is locked automatically by the system based on api_key; it cannot and need not be specified via parameters.

Request Parameters (Query String)

Two optional time ranges are provided, both in RFC3339 UTC format:

FieldTypeDescription
create_start_timestringMatching (submission) time start (≥), RFC3339 UTC
create_end_timestringMatching time end (<), RFC3339 UTC
settlement_start_timestringSettlement time start (≥), RFC3339 UTC
settlement_end_timestringSettlement time end (<), RFC3339 UTC

TIP

  • Provide at least one group (create or settlement); when both are provided they act as an AND condition (matching falls within range A and settlement falls within range B).
  • Each group must provide both start and end; missing one returns code:10020.
  • Each group's range is at most 90 days; exceeding it returns code:10020. The minimum supported interval is 1 second.
  • Unsettled (pending) trades have no settlement time and are only included via the create range; when only a settlement range is provided, unsettled statistics do not appear.

Example

GET /api/v1/exchange/report/trade-summary?create_start_time=2026-05-19T00:00:00Z&create_end_time=2026-06-18T00:00:00Z

Response data

json
{
  "code": 0,
  "message": "success",
  "data": {
    "trade_count": 9,
    "win_count": 2,
    "lose_count": 0,
    "void_count": 0,
    "unsettled_count": 7,
    "currency": "EUR",
    "total_turnover": "701.00000000",
    "valid_turnover": "374.00000000",
    "void_turnover": "0.00000000",
    "unsettled_turnover": "327.00000000",
    "commission": "8.11750000",
    "net_pnl": "154.23250000",
    "total_payout": "528.23250000",
    "usd_total_turnover": "771.10000000",
    "usd_valid_turnover": "411.40000000",
    "usd_void_turnover": "0.00000000",
    "usd_unsettled_turnover": "359.70000000",
    "usd_commission": "8.92900000",
    "usd_net_pnl": "169.65500000"
  }
}

Response fields

FieldTypeDescription
trade_countintegerTotal count (sum of all three categories); returns 0 when there is no data
win_countintegerValid — number of wins (WIN / HALF_WIN)
lose_countintegerValid — number of losses (LOSE / HALF_LOSE)
void_countintegerNumber of void trades
unsettled_countintegerNumber of unsettled trades
currencystringThe currency bound to this agent; empty string when there is no data
total_turnoverstringFull turnover = valid + void + unsettled, decimal string fixed to 8 places
valid_turnoverstringValid turnover, decimal string fixed to 8 places
void_turnoverstringVoid turnover, decimal string fixed to 8 places
unsettled_turnoverstringUnsettled turnover, decimal string fixed to 8 places
commissionstringCommission (valid only), decimal string fixed to 8 places
net_pnlstringP&L (valid only), from the player's perspective: positive = player net win, commission deducted; net_pnl = total_payoutvalid_turnover; may be negative
total_payoutstringPayout (valid only), decimal string fixed to 8 places
usd_total_turnoverstringFull turnover (USD), decimal string fixed to 8 places
usd_valid_turnoverstringValid turnover (USD), decimal string fixed to 8 places
usd_void_turnoverstringVoid turnover (USD), decimal string fixed to 8 places
usd_unsettled_turnoverstringUnsettled turnover (USD), decimal string fixed to 8 places
usd_commissionstringCommission (USD), decimal string fixed to 8 places
usd_net_pnlstringP&L (USD), decimal string fixed to 8 places; may be negative

Category definitions

Each submission is assigned to exactly one category based on its settlement status; the counts and turnover of each field are aggregated on this basis:

  • Valid: settlement_status = SETTLED and settlement_result is WIN / HALF_WIN / LOSE / HALF_LOSE
  • Void: SETTLED but PUSH / VOID, or market-voided, or matching rejected
  • Unsettled: status = accepted and settlement_status = PENDING

BFX EXCHANGE · BE THE GAME CHANGER