Skip to Content

Connecting to Lighter

Lighter connects to JetScalp not with an “API Key + Secret Key” pair but with a Lighter API key. Trading requires three values:

  • Account Index — the number of your Lighter account.
  • API Key Index — the number of the API key on that account.
  • API Private Key — the private key of the API key, which JetScalp uses to sign orders.

Important: JetScalp does not need your wallet’s seed phrase or private key — only an API key created on Lighter.

1.Connect your wallet to Lighter

Open Lighter  and connect the Web3 wallet your Lighter account is linked to, such as MetaMask or Rabby. Connect the exact wallet that holds your account.

2.Find your account index

Click your wallet address in the top-right corner of Lighter and open Explorer. Your Account Index is shown on the account page. You can also open the Lighter explorer  directly and look up the account by your wallet address.

One Lighter wallet can have a main account and several sub-accounts, each with its own account index and its own API keys. Enter the index of the account you are going to trade on, and create the API key for that account.

3.Create an API key

Open the Lighter API keys page .

Choose a free API Key Index and create the key. Lighter will ask you to sign the request in your connected wallet.

Key indexes range from 0 to 254. Indexes 0–3 are reserved for Lighter’s web and mobile apps, so pick an index from 4 to 254 for JetScalp (Lighter API ).

Once the key is created, Lighter shows:

API Key Index Public Key Private Key

Important: The Private Key is shown only once — save it right away. If you lose it, create a new key. Set up a separate key for JetScalp that no other program or bot uses.

4.Add the connection in JetScalp

Open Settings Settings → Connections, click Add connection below the connection list and click the tile Lighter. The connection appears in the list, and its settings appear on the right.

Fill in the connection settings:

FieldValue
NameThe connection name in the list. By default it is the exchange or broker name; you can change it.
Account indexThe Account Index from step 2.
API key indexThe API Key Index from step 3, 4 by default.
API private keyThe API key's Private Key from step 3.
FeeThe Approve fee button, see step 5.
ProxyA proxy from the list or None. See Proxy settings.

The private key is stored encrypted in the JetScalp settings.

5.Allow the JetScalp fee

Before turning the connection on for the first time, click Approve fee in the Fee row of the connection settings.

For Lighter Plus and Premium accounts, JetScalp charges a 0.01% fee on perpetual (perp) trade volume, for both maker and taker. JetScalp does not trade spot on Lighter: an order for a spot symbol is rejected with “Lighter: only perpetual contracts are traded.”. No fee is charged on Standard accounts, and they do not need the approval.

Lighter allows such a fee only after the account owner signs an approval with their wallet (Lighter API ).

Steps:

  1. Fill in the Account index, API key index and API private key fields.
  2. Click Approve fee.
  3. JetScalp opens a signing page in your default browser and copies its link to the clipboard. If your wallet is installed in a different browser, paste the link there.
  4. In your wallet, select the same wallet that owns the Lighter account and sign the approval.
  5. Once Lighter accepts the approval, the message “Fee approved.” appears under the button. If the connection is already on, JetScalp reconnects it right away.

While JetScalp is waiting for the signature, the button reads Cancel — click it to stop waiting.

The approval does not expire. It caps the fee at 0.01%: JetScalp cannot charge more. Your seed phrase and wallet private key are not passed to JetScalp — the wallet only signs the approval.

Without a signed approval, a Plus or Premium account will not connect, and JetScalp will tell you to click Approve fee.

6.Turn on the connection and check

Turn the connection on with the switch on the right of its row in the list. The state appears under the connection name: first connecting…, then connected. If the connection fails, the error text appears there — the full text is shown in the tooltip and in the header of the connection settings. For all states, see Connections.

Check that:

  • Lighter is connected.
  • The account balance is shown.
  • Open positions are shown.
  • Orders are placed and canceled.

If the connection does not work

API keys are not set

The message “Lighter: API keys are not set — account index, key index and private key.” means the Account index or API private key field is empty. Fill in all three fields: Account index, API key index and API private key.

API keys are invalid or rejected

Check that:

  • the private key is copied in full, without extra spaces;
  • the key index matches the index the key was created under on Lighter and is between 0 and 254;
  • the account index is the index of the account or sub-account the key was created for.

If a new key was created under the same index on Lighter, the old private key no longer works — enter the new one.

JetScalp fee not allowed

Click Approve fee in the connection settings and sign the approval with the account’s wallet (see step 5).

Wallet cannot sign

The approval is accepted only from the wallet that owns the Lighter account. If a different wallet is selected on the signing page, JetScalp shows the address of the right one — switch to it in your wallet and try again.

Security

Never share your API private key — not in chats or Telegram, not with support, not on forums, screenshots or public repositories.

The API private key lets anyone trade on your account. An API key alone cannot withdraw funds to someone else’s address: that requires a wallet signature.

JetScalp does not need your seed phrase or wallet private key. Never enter them into JetScalp or share them with anyone.

If the key has been published or you suspect someone else has obtained it, create a new key on Lighter under the same index — the old one stops working — and enter the new private key in JetScalp.

Last updated on