↓ Skip to main content
All methods

stakepd.kalshi_data.KalshiClient.get_event_positions

API key → DataFrame
Signature
client.get_event_positions(*, event_ticker=None, settlement_status="unsettled",
                           count_filter=None, max_results=None)

List your positions added up per event.

Parameters

event_ticker:str, optional
Only this event.
settlement_status:{'unsettled', 'settled', 'all'}, default 'unsettled'
"unsettled" returns open positions.
count_filter:{'position', 'total_traded'} or list of them, optional
Leaves out rows where that value is zero. For example, count_filter="position" hides markets you’ve fully exited.
max_results:int, optional
Stop after this many rows. None (the default) fetches all of them, following Kalshi’s pages for you.

Returns

pandas.DataFrame
One row per event.
Main columns
ColumnTypeDescription
event_tickerstrEvent ticker
total_costfloatTotal cost, in dollars
total_cost_sharesfloatContract count
event_exposurefloatExposure in this event, in dollars
realized_pnlfloatRealised profit or loss, in dollars
fees_paidfloatFees paid, in dollars

Raises

KalshiAuthError
If the client has no credentials. Raised before any request is sent.

See also

KalshiClient.get_positions
Positions per market.
KalshiClient.get_events
List events, one row per event.

Examples
#

from stakepd import kalshi_data as kd

client = kd.KalshiClient.from_env()   # portfolio data needs an API key

Where your money is, by event:

ev = client.get_event_positions(count_filter="position")
ev.sort_values("event_exposure", ascending=False)[["event_ticker", "event_exposure", "realized_pnl"]]

This method is also covered, alongside the rest of the module, in the overview guide.