Import existing Lighter API credentials for a wallet. Used when delegation or server wallet generation is not possible.
POST/api/trading/lighter/import| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Authorization | Bearer <jwt_token> | Yes |
| Field | Type | Required | Description |
|---|---|---|---|
walletIdOrAddress | string | Yes | The wallet address or internal wallet ID associated with these credentials |
accountIndex | number | Yes | The Lighter account index (usually 0 or 1) |
apiKeyIndex | number | Yes | The index of the API key being imported |
apiPublicKey | string | Yes | The public key of the API key pair |
apiPrivateKey | string | Yes | The private key of the API key pair |
| Field | Type | Description |
|---|---|---|
success | boolean | Operation status |
message | string | Success message |
timestamp | number | Unix timestamp in milliseconds |
accountIndex - Your Lighter account indexapiKeyIndex - The API key indexapiPublicKey - Your API public keyapiPrivateKey - Your API private keyJWT token for authentication. Required for smart order execution.
The wallet address or internal wallet ID associated with these credentials
"0xA5BD439c4d4Fc7cA8B14A9FE77fd5C4FFd7e4996"
The Lighter account index (usually 0 or 1)
0
The index of the API key being imported
10
The public key of the API key pair
"0x..."
The private key of the API key pair
"0x..."