Your trading key
Your trading key signs your orders, so your wallet doesn’t have to sign each one. It is made on your device, stays there, and can withdraw only to your wallet.
On this page: How it’s made
The trading key is one of Lighter’s API keys, registered to your account with your wallet’s signature. It is a separate key from your wallet’s private key, which never leaves your wallet. Mirrorlane never asks for your seed phrase or your wallet’s private key.
How it’s made
Section titled “How it’s made”When you choose Enable trading, your browser makes the key and your wallet signs for it.
- Seed the key. Your browser draws 32 bytes from its secure random source. With 2 signatures, the default, your wallet first signs a short Mirrorlane message whose signature is mixed into the seed. With 1 signature, the browser’s randomness alone seeds it.
- Register it. Your wallet signs Lighter’s registration message, which adds the key to your account in a slot of its own.
- Confirm it’s live. Mirrorlane checks that your account lists the key before you trade.
If the browser’s random source is missing or has been replaced, often by an extension, key creation stops and nothing is signed. Mirrorlane also warns when your device’s clock is out of sync, since signing may fail. Your account needs collateral before it can register a key, so new accounts deposit first.
A key works for one account. Each sub-account you trade from needs its own key on this device, which your wallet signs for the first time you switch to it. Each device gets its own key too.
Where it lives
Section titled “Where it lives”The key is made and used inside a background worker that every Mirrorlane tab on this device shares. Tabs ask the worker to sign and never see the key. It is never sent to our servers or written to a log or an error report.
Remember this device, called Remember me in Settings, decides whether the key outlasts your visit. It is on by default and applies to the next key you make.
| Remember me | What happens |
|---|---|
| On | The key is stored in this browser, encrypted with a key the browser holds and won’t let anyone read out. When you come back and your wallet connects, trading is on with no wallet prompt. Logging out keeps it stored for your next visit. |
| Off | The key lives in the worker’s memory for this session only. Next visit, you enable trading again, and the new key replaces the old one in the same slot. |
What it can do
Section titled “What it can do”- Place, change and cancel orders, including the strategies that run in your browser.
- Change leverage and margin, and switch your account type.
- Create sub-accounts and move funds between your own accounts.
- Make secure withdrawals, which go only to your wallet’s address.
- Read your account’s orders and history.
- Revoke the fee approval, which needs no wallet prompt.
What it can’t do
Section titled “What it can’t do”It is made on your device and can withdraw only to your wallet. On its own, it can’t send funds to anyone else, make a fast withdrawal or approve a fee: each of those needs your wallet’s signature too. It can’t register or revoke a key either, so a key can’t be added to your account without your wallet.
It can still trade. Someone who got hold of it could place orders on your account, which is why every key is listed and can be revoked.
See, refresh or revoke it
Section titled “See, refresh or revoke it”API keys, in your account menu, lists every key that can sign for an account: its slot, who uses it, its public key and when it last signed. Your key here reads Mirrorlane, marked This device. The slots Lighter’s own apps use carry their names, and any other key reads Unnamed key, including a key Mirrorlane made on another of your devices, so check Last used before you revoke. Read-only tokens and keys for bots stay in Lighter’s app.
- Refresh. Settings, Security, This device’s key, Refresh key: your wallet registers a new key in the same slot, replacing the old one.
- Revoke. Any key on the list, after a confirmation. Your wallet signs once, and it can’t be undone. Revoking this device’s key stops your strategies first, then logs you out and disconnects your wallet.
- Auth signatures. Choose 2 signatures or 1 for the next key this device makes.
A revoke is signed with this device’s key for the same account, so to revoke a key on another account, switch to that account first.
If you lose a device
Section titled “If you lose a device”Revoke its key from another device, or from the API keys page in Lighter’s app with the same wallet. A remembered key that has been revoked or replaced is deleted from the device the next time it tries to open.
Updated