REGISTER_API_KEY (ChangePubKey) transaction. Trading actions are signed by that API key inside a Go WASM signer (see Signing Model).
Topics
- Signing Model — WASM-blob signing, the API key vs L1 wallet, and the dual-signed REGISTER_API_KEY flow
- Deposits — Funding your Lighter account from Ethereum mainnet
- Setup — Registering the trading API key before placing orders
- Trading — All trading and account actions with parameters
- Withdrawals — Withdrawing USDC, including the opportunistic fastwithdraw path
- WebSocket Protocol — Native WebSocket protocol, channel mapping, and authenticated channels
Defaults & assumptions
- Default margin mode:
CROSSwhenmarginModeis omitted onplaceOrder/updateLeverage. - Trade signing: all trading actions — including withdrawals — are signed by the registered API key (no per-trade wallet popup).
- Order fields:
priceis required. - Withdrawals: must go to the account owner address — third-party destinations are rejected.
- Deposits: only from Ethereum mainnet (chain ID
1); for other source chains, bridge USDC to Ethereum first via LI.FI routes.
Notes
- Trading uses a single API key slot per account (slot index
42by default). Re-registering overwrites the prior key.
Related Pages
- Concepts — The action pattern, streaming, and multi-provider support
- SDK / Streaming — Subscribe to live market data and user events via WebSocket
- SDK / Account — Fetch account balances, positions, and fills
- SDK / Trading — Place orders, cancel orders, and query order status
- SDK / Actions — The create -> sign -> execute pattern for all operations