Guide · updated September 2026
How to export your Kalshi trade history
Kalshi gives you a monthly PDF statement and a positions CSV. Neither shows a live equity curve, win rate by category or what fees cost you per trade. This guide covers the three ways to get your own trades out: the CSV export, the API with a read-only key, and a journal that imports both.
1. The Documents CSV export (no key needed)
- On desktop, open the account menu (top right) and choose Documents. The tab is not in the mobile app.
- Download the positions export. You get one CSV row per matched position, not per fill.
- Columns you will see:
market_ticker,side,quantity,entry_price_cents,open_fees_cents,open_timestamp, plus the closing price, fees and timestamp for closed positions.
Prices and fees are integer cents per contract, so a 40¢ yes withquantity 25 is $10.00 of exposure before fees. Note that this format replaced the older Ticker, Type, Direction, Contracts, Average_Price, Createdtransaction export in 2025. Scripts and community dashboards built on the old layout stopped working at that point; the open-source kalshi-dash, for example, only caught up with the new column names in August 2026. Check any parser you rely on against a fresh export.
2. Create a read-only API key
- Open the menu (top right) and go to Account & security.
- Scroll to API Keys and click Create Key.
- Give it a nickname and select Read only, not Read/write.
- Kalshi generates the RSA keypair for you. Save the downloaded private key file and copy the
Key ID. The private key is shown once and cannot be retrieved later.
A read-only key can list your fills, settlements, positions, orders and balance. It cannot place or cancel orders or withdraw. Read-only access does not require a funded account either, so it is safe to create just for analytics.
3. Pull fills and settlements from the API
Portfolio endpoints are authenticated: every request carries your key ID, a millisecond timestamp and an RSA-PSS (SHA-256, salt 32) signature of {timestamp}{METHOD}{path}, where path excludes the query string.
GET https://api.elections.kalshi.com/trade-api/v2/portfolio/fills?limit=1000&min_ts=1751328000 GET https://api.elections.kalshi.com/trade-api/v2/portfolio/settlements?limit=1000
- Each fill has
ticker,side(yes or no),action(buy or sell),count_fp,yes_price_dollars/no_price_dollars,is_taker,fee_cost(dollars, authoritative) andcreated_time. min_tslets you sync incrementally; store the newestcreated_timeyou have seen and pass it next run.- Settlements give you
market_result(yes or no) andsettled_timeper ticker, which is what turns open positions into realized P&L. - Fills older than roughly three months move to
/historical/fills. See the order book and historical data guide for the cutoff endpoint and pagination.
4. Minimal Python: all fills to CSV
import base64, csv, time, requests
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import padding
BASE = "https://api.elections.kalshi.com/trade-api/v2"
KEY_ID = "your-key-id"
PRIV = serialization.load_pem_private_key(open("kalshi.key", "rb").read(), password=None)
def headers(method, path):
ts = str(int(time.time() * 1000))
msg = f"{ts}{method}/trade-api/v2{path}".encode()
sig = PRIV.sign(msg, padding.PSS(mgf=padding.MGF1(hashes.SHA256()),
salt_length=32), hashes.SHA256())
return {"KALSHI-ACCESS-KEY": KEY_ID, "KALSHI-ACCESS-TIMESTAMP": ts,
"KALSHI-ACCESS-SIGNATURE": base64.b64encode(sig).decode()}
def all_fills():
cursor = ""
while True:
r = requests.get(BASE + "/portfolio/fills", headers=headers("GET", "/portfolio/fills"),
params={"limit": 1000, "cursor": cursor}).json()
yield from r["fills"]
cursor = r.get("cursor") or ""
if not cursor:
break
with open("kalshi_fills.csv", "w", newline="") as f:
w = csv.writer(f)
w.writerow(["ticker", "side", "action", "count", "price", "fee", "time"])
for x in all_fills():
price = x["yes_price_dollars"] if x["side"] == "yes" else x["no_price_dollars"]
w.writerow([x["ticker"], x["side"], x["action"], x["count_fp"], price,
x.get("fee_cost", "0"), x["created_time"]])From here P&L is bookkeeping: match buys to sells or settlements per ticker and side, subtract fee_cost on every leg. The fee is where most home-made spreadsheets go wrong; read how Kalshi fees work before trusting your totals, or check a single trade with the fee calculator.
5. Or skip the script
FillBook does the above for you. Paste a read-only key (or upload the Documents CSV, no key at all) and it imports fills and settlements, applies Kalshi's official market categories, and shows realized P&L with fees folded in, win rate by category, equity curve and edge by holding time. It syncs daily on its own.
See the live demo → or import your own fills. Free for the last 60 days, no card.
FAQ
- Can I export my Kalshi trade history to CSV?
- Yes. On desktop, open your account menu, go to Documents, and download the positions export. It is a CSV with one row per matched position (market_ticker, side, quantity, entry_price_cents, open_fees_cents, open_timestamp and the closing columns). Kalshi changed this format in 2025, so older parsers built for the Ticker/Type/Direction layout no longer work.
- How do I get my Kalshi fills through the API?
- Create an API key under Account & security, choose Read only, then call GET /portfolio/fills with your key ID and an RSA-PSS signed request. Results are cursor-paginated (limit up to 1000) and each fill carries ticker, side, action, count_fp, yes_price_dollars / no_price_dollars, fee_cost and created_time.
- Does a read-only Kalshi API key let anyone trade on my account?
- No. A Read only key can list fills, settlements, positions, orders and balance, but it cannot place or cancel orders or withdraw funds. That is the only kind of key you should paste into a third-party journal or dashboard.
- Does Kalshi show my total P&L with fees?
- Kalshi's monthly statements in Documents show FIFO P&L with and without fees, updated at the start of each month. For live, per-trade P&L and win rate by category you need either the API or a journal tool that imports your fills.
- What about kalshi-dash?
- kalshi-dash is an open-source, upload-your-CSV performance tracker. It broke when Kalshi renamed the export columns in 2025 and was patched for the new schema in August 2026. It stays manual (re-upload each year's CSV) and has no API sync or fee breakdown. FillBook imports the current Documents CSV or syncs daily through a read-only key, and is free for the last 60 days of analytics.
UI labels and endpoints reflect Kalshi's app and public API docs as of September 2026. Not affiliated with Kalshi; confirm against docs.kalshi.com.