Balance operations
Balance operations
Inspect wallet mutation records against operator adapter.
Path
GET /api/operator/balance-operations
Required scope: balance_operations:read
Query params
All query parameters are optional.
| Parameter | Type | Requirement | Values/default |
|---|---|---|---|
status | string | Optional | One of the operation statuses below. |
direction | string | Optional | One of the direction values below. |
type | string | Optional | trade, resolution, polyflight_purchase, or polyflight_ticket. |
product | string | Optional | opinion (default), polyflight, or explicitly labelled all. Polyflight/all additionally require polyflight:read unless scope is *. |
market | string | Optional | Convenience filter: positive numeric market ID or exact market slug. |
market_id | positive integer | Optional | Exact market ID; takes precedence over numeric market. |
market_slug | string | Optional | Exact market slug; takes precedence over a slug in market. |
external_user_id | string | Optional | Exact operator-side user ID. |
order_id | positive integer | Optional | Exact Mini App order ID. |
redemption_item_id | positive integer | Optional | Exact Mini App redemption item ID. |
created_from | datetime | Optional | Inclusive creation-time lower bound. |
created_to | datetime | Optional | Inclusive creation-time upper bound. |
sort | string | Optional | created_at_desc (default), updated_at_desc, or next_retry_at_asc. |
page | positive integer | Optional | Default 1. |
page_size | positive integer | Optional | Default 50, maximum 100. |
Direction values:
debitcreditdebit_reversalcredit_reversal
Status values:
plannedsentsucceededfailedunknownretryingmanual_review
Filtered summary
Every response includes a summary computed across all rows matching the same authenticated-operator and query-filter predicates as items and pagination.total. Summary values are not limited to the current page and are not implicitly restricted to succeeded; use status when a status-specific report is required.
| Field | JSON type | Definition |
|---|---|---|
credit_external_amount_minor_total | integer | Sum of non-negative operation amounts for credit and debit_reversal. |
debit_external_amount_minor_total | integer | Sum of non-negative operation amounts for debit and credit_reversal. |
volume_external_amount_minor_total | integer | Credits total plus debits total. |
currency_code | string | Authenticated operator's configured currency code. |
The response also returns product_scope and includes_multiple_products. Summary amounts follow the explicit product filter; the default remains Opinion-only so Polyflight money is never silently mixed into existing Opinion views.
created_from and created_to remain inclusive for the summary, count, and rows. Dashboard date-only filters expand to 00:00:00.000Z and 23:59:59.999Z UTC before calling this endpoint.
Response highlights
external_amount_minorcurrency_codeidempotency_keyremote_referencerequest_jsonresponse_jsonbalance_after_minorproductoperation_typepolyflight_purchase_request_idandpolyflight_ticket_id, when applicableoriginal_operation_id, when applicablefailure_reasonattempt_countnext_retry_at- nested
operator_user - nested
market, nullable for Polyflight
balance_after_minor is nullable and is extracted from wallet response balanceMinor or balance_minor when present.
operation_type is derived from source links: order_id means trade; redemption_item_id means resolution; Polyflight purchase/ticket links mean polyflight_purchase / polyflight_ticket; an unlinked historical/internal row returns unknown.
