Skip to main content
Subscribe to real-time balance ledger entries (deposits, withdrawals, fills, fees, adjustments) using gRPC streaming. The stream first replays any entries since resume_time, then pushes new entries as they happen. For paginated historical queries and CSV exports of the same data, see the Balance Ledger REST API.
This stream is distinct from Funding Transaction Streaming: that stream tracks transaction state changes (PENDING → COMPLETED, etc.) for deposits/withdrawals; this stream tracks the balance impact of every cash event in the ledger.

Service Definition

Service: polymarket.v1.FundingAPI RPC: CreateBalanceLedgerSubscription Type: Server-side streaming Required Scope: read:positions

Request Parameters

CreateBalanceLedgerSubscriptionRequest

Cross-firm access is rejected. The account must belong to the firm in the JWT firm_id claim. Cross-firm subscriptions return PERMISSION_DENIED immediately.

Response Messages

The stream returns CreateBalanceLedgerSubscriptionResponse messages.

CreateBalanceLedgerSubscriptionResponse

BalanceLedgerEntry

Firm-level omnibus and reserve account identifiers are static configuration provided during onboarding; they are not discovered through the KYC API.

Stream Behavior

  1. Replay phase. On connect, the server first delivers entries with update_time >= resume_time (clamped to the 2026-05-01 floor). If resume_time is omitted, only live entries are delivered.
  2. Live phase. After the replay drains, the server pushes new entries as they are committed.
  3. Suppressed entry types are filtered server-side and never reach clients.
  4. Empty entries messages are heartbeats and should be passed through (do not treat as termination).

LedgerEntryType Allowlist

The full allowlist plus suppressed (internal) types are documented on the Balance Ledger REST overview.

Stream Limits

Exceeding the per-firm concurrent stream cap returns ResourceExhausted.

Metrics

The gateway exposes Prometheus metrics for balance ledger subscriptions:

Complete Python Example

Sample Output

Reconnection Handling

Persist the most recent update_time so reconnections resume without gaps:
resume_time is clamped upstream to 2026-05-01T00:00:00Z; passing an earlier value is allowed but only entries from the floor forward are replayed.

REST vs Streaming

Error Codes

Next Steps

Balance Ledger REST

Paginated query and CSV download

Position Ledger

Position changes (quantity, cost, realized P&L)

Funding Transactions

Deposit / withdrawal state changes

Authentication

gRPC authentication setup