How it works
PnLens turns the trade history on your exchange accounts into clear profit and loss numbers. You connect a read-only key, PnLens reads your trades, and the dashboard does the math. It cannot trade, and it cannot move your money.
What PnLens does
PnLens is a trading PNL tracker for people who use more than one exchange. It reads your fills from each venue and shows them in one place.
- Realized PNL across Binance, OKX, Bybit, Bitget and Gate.io, side by side or per exchange.
- A daily PNL calendar and charts for any date range, so you can see which days and weeks made or lost money.
- Spot PNL worked out per coin from your buys and sells, plus futures results and fees.
- An AI assistant that answers questions about your own numbers.
Get started
Create your PnLens account
Sign up with your email and a password, or continue with Google. Nothing else is needed to look around.
Create a read-only API key on your exchange
An API key is a pair of credentials that lets PnLens read your account. Create it inside your exchange, and give it the read permission only.
Leave trading, transfers and withdrawals switched off. PnLens checks the key when you connect it and refuses any key that can withdraw.
What each exchange needs
Credentials and history window for each supported exchange Exchange You paste into PnLens History per scan Binance API key + Private key 180 days OKX API key + Secret + Passphrase 90 days Bybit API key + Private key 180 days Bitget API key + Passphrase + Private key 90 days Gate.io API key + Secret 90 days
BinanceAPI key + Private key- Generate a key pair on your computer (see "Generate a key pair" below). Ed25519 is recommended, RSA 2048 also works.
- In Binance open API Management and choose Create API, then the self-generated (asymmetric) option.
- Paste the contents of public_key.pem, including the BEGIN and END lines, into the public key box.
- Enable Reading only. Keep trading, margin, futures trading and withdrawals off.
- Copy the API key Binance gives you. In PnLens paste it with the contents of private_key.pem.
Binance has no secret for this kind of key. Your private key takes its place.
OKXAPI key + Secret + Passphrase- In OKX open the API page and create a new API key.
- Choose the Read only permission. Do not tick Trade or Withdraw.
- Set a passphrase and remember it. OKX cannot show it again.
- Copy the key and the secret shown once after creation, and paste all three into PnLens.
If any of the three values is missing or mistyped, OKX rejects the key.
BybitAPI key + Private key- Generate an RSA 2048 key pair on your computer (see "Generate a key pair" below).
- In Bybit open API Management and create a key of the self-generated (RSA) type.
- Paste the contents of public_key.pem into the public key box.
- Set the permission to Read-Only. Leave order placement, withdrawals and transfers unchecked.
- Copy the API key. In PnLens paste it with the contents of private_key.pem.
BitgetAPI key + Passphrase + Private key- Generate an RSA 2048 key pair on your computer (see "Generate a key pair" below).
- In Bitget open API key management and create a key with a self-generated RSA public key.
- Paste the contents of public_key.pem, and set a passphrase you will remember.
- Grant read permission only. Leave trade, transfer and withdraw off.
- Copy the API key. In PnLens paste the key, the passphrase and the contents of private_key.pem.
Gate.ioAPI key + Secret- In Gate.io open API management and create a new API v4 key.
- Set every permission you are offered to Read only. Leave spot trade, futures trade and withdrawal off.
- Copy the key and the secret shown after creation, and paste both into PnLens.
Gate.io shows the secret once. Save it before you close the page.
Generate a key pair
Binance, Bybit and Bitget ask you to bring your own key pair. You give the exchange the public half and PnLens the private half. Run these commands in a terminal where OpenSSL is installed.
Ed25519 (Binance, recommended)
openssl genpkey -algorithm ed25519 -out private_key.pem openssl pkey -in private_key.pem -pubout -out public_key.pemRSA 2048 (Bybit, Bitget, or Binance)
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out private_key.pem openssl pkey -in private_key.pem -pubout -out public_key.pemThe private key starts with -----BEGIN PRIVATE KEY-----, which is the form PnLens expects. Never share it, and never paste it anywhere except the PnLens connect form. Binance and Bybit also publish a small desktop key generator if you prefer clicking to typing.
Connect the key in PnLens
Open Exchange in the app, pick your exchange and paste the credentials listed in step 2. PnLens tests the key straight away and tells you if a permission is wrong.
Run a scan to import your trades
Press Sync on the connected exchange. Each scan reads the longest history that exchange allows (listed in step 2) up to now.
The scan runs in the background, so you can leave the page. You can run another scan after about 15 minutes.
Calculate and read your PNL
Open the dashboard and press Calculate. You get the summary, the PNL chart, the daily calendar and your recent trades.
Days follow UTC+7. A trade made late in the evening in another time zone can land on the next calendar day.
Ask the AI assistant
Open AI Assistant and ask things like which coin cost you the most this month or how your fees compare to your profit. It answers from your imported trades.
Security
You are handing PnLens a key to your trading history, so the rules are strict and simple.
- Read-only, enforced
- PnLens asks the exchange what the key can do before it saves anything. A key that can trade or withdraw is rejected, even if you meant to allow it.
- Encrypted at rest
- Your credentials are encrypted with AES-256-GCM before they are stored. They are decrypted only while a scan is running.
- Yours to remove
- You can delete a connected exchange at any time from the Exchange page. Revoke the key on the exchange as well if you want to be sure.
FAQ
Why does PnLens only accept read-only keys?
PnLens only needs to see your trades. A read-only key cannot place orders or withdraw funds, so the worst case from a leak is that someone sees your history. PnLens rejects any key that has trade or withdraw permission.
How far back does my history go?
Each scan reads the longest window the exchange gives out: Binance 180 days, OKX 90 days, Bybit 180 days, Bitget 90 days, Gate.io 90 days. Older trades are not available through the exchange API, so they cannot be imported.
Why do my numbers differ from the exchange app?
Exchanges group days by their own time zone and may count unrealized PNL, funding or promotions in their headline figure. PnLens counts realized results from your fills and groups days in UTC+7. Deposits and withdrawals are not treated as profit or loss.
My scan is stuck or says I am rate limited.
Scans run in the background and can take a few minutes for a long history. After a scan finishes you can start another one about 15 minutes later. If it still looks stuck after half an hour, start a new scan; the old one is released automatically.
Are trading fees included?
Yes. Fees are taken from your fills and counted against your results, and the dashboard shows what you paid.
The exchange says my key is invalid or lacks permission.
Check that you copied every credential for that exchange (listed in step 2), that the passphrase is the one you set, and that Reading is enabled. If you added an IP restriction on the exchange, scans from other addresses will fail, so remove the restriction or create a new key.
How do I delete a key?
Open Exchange in the app and remove the connected account. PnLens deletes the stored credentials. To be fully safe, also delete the API key in your exchange settings.
Can PnLens place trades for me?
No. It has no trading access, and the AI assistant can only read your imported data.
Do I need to scan every day?
Scan whenever you want fresh numbers. Every scan re-reads the full window and updates your trades, so nothing is missed between scans as long as the trades fall inside the exchange history window.
PnLens only ever reads your trades. Your funds stay on your exchange.