To import your Kalshi trade history, QastLedger needs an API key from your Kalshi account. Creating one takes about two minutes. This guide walks you through it.
What you'll need
A Kalshi API key has two parts, and you need both:
- Key ID: a short code that identifies the key, like
7c3a9e21-4b8f-… - Private key: a long block of text that starts with
-----BEGIN RSA PRIVATE KEY-----
Step 1: Create the key in Kalshi
- Log in to kalshi.com on a computer. It's easier than on a phone, because you'll be copying a long block of text.
- Open your account settings. Click your profile icon, then look for Account & security or Settings, and find the API Keys section.
- Click "Create New API Key". If it asks for a name, call it something you'll recognize later, like
QastLedger. - Save both parts right away. Kalshi shows you the Key ID and the private key, and may offer the private key as a file download. Kalshi only shows the private key once. Copy it or download it before you close that window.
Kalshi updates its website from time to time, so the menu names may differ slightly. If you can't find the API Keys section, search Kalshi's help center for "API keys".
Step 2: Connect it to QastLedger
- In QastLedger, go to Trade History and find the Kalshi card.
- Paste your Key ID.
- Paste your private key, the whole thing, including the
-----BEGIN…and-----END…lines. - Make sure Environment is set to Production. Only choose Demo if you're connecting an account on Kalshi's separate demo site for practice trading.
- Click Connect Kalshi. Your trade history starts importing.
Lost your private key?
Kalshi can't show it again, but that's no problem. Delete the old key in Kalshi, create a new one, and reconnect in QastLedger with the new Key ID and private key.
Troubleshooting
| Problem | Fix |
|---|---|
| Kalshi won't connect | Check that Environment is Production, and that you pasted the entire private key, including the BEGIN and END lines. |
| Can't find the private key | Kalshi only shows it once. Delete the key in Kalshi and create a new one. |
| Connected, but trades are missing | Make sure you connected the same Kalshi account you trade from, with Environment set to Production. |
Still stuck? Email [email protected] and we'll help you get connected.
Also trade on Polymarket? See how to find your Polymarket wallet address. Once you're connected, read how Kalshi trades are taxed.
This guide is general information, not tax advice. Tax treatment of event contracts is still evolving, so confirm how it applies to you with a tax professional.