The Lighter provider exposes trading and balance operations in the actions array from GET /providers. Each action lists which signers can execute it.
For account setup actions (the provider’s setup array) and post-setup options (options), see Setup. For full parameter schemas, see the Actions API reference.
actions
Trading actions are signed by the registered API key (PerpsSigner.API_KEY). Deposits are the exception — a plain L1 EVM transaction signed by the user’s wallet (documented separately, see the note below).
placeOrder
Places a new market or limit order. Trigger orders (TP/SL attached to a new entry) and standalone trigger orders are submitted via the same placeOrder action — the WASM signer routes through SignCreateOrder for all variants.
| |
|---|
| Signers | API_KEY (WASM blob) |
| Params | PlaceOrderParams — { market, side, type?, size, price?, leverage?, marginMode?, reduceOnly?, timeInForce?, expiresAt?, takeProfit?, stopLoss? } |
| SDK methods | placeOrder() |
cancelOrder
Cancels one or more open orders by ID.
| |
|---|
| Signers | API_KEY (WASM blob) |
| Params | CancelOrderParams — { ids } |
| SDK methods | cancelOrders() |
cancelAllOrders
Cancels every open order on the account. Lighter exposes this as a first-class WASM action (SignCancelAllOrders) rather than requiring per-order cancellation.
| |
|---|
| Signers | API_KEY (WASM blob) |
| Params | (none beyond the implicit account/key context) |
| SDK methods | Dispatched via execute() — no dedicated wrapper |
modifyOrder
Modifies one or more existing orders in-place — change price, size, or trigger parameters without cancelling and re-placing.
| |
|---|
| Signers | API_KEY (WASM blob) |
| Params | ModifyOrderParams — { modifications: [{ id, price?, size?, triggerPrice? }] } |
| SDK methods | modifyOrders() |
updateLeverage
Changes the leverage and/or margin mode (cross / isolated) for a market.
| |
|---|
| Signers | API_KEY (WASM blob) |
| Params | UpdateLeverageParams — { market, leverage, marginMode? } |
updatePositionMargin
Adds or removes margin on an isolated position. Use this to adjust liquidation price without changing the position size.
| |
|---|
| Signers | API_KEY (WASM blob) |
| Params | UpdatePositionMarginParams — { market, action: 'add' | 'remove', amount } |
| SDK methods | updatePositionMargin() |
Deposits are documented separately on the Deposits page. deposit is the one actions entry signed by the user’s L1 wallet (two EVM_TX steps — approve then deposit) rather than the API key, and requires chainId: 1 (Ethereum mainnet).
Withdrawals are documented separately on the Withdrawals page — covering the standard vs fast (fastwithdraw) settlement paths and the account-owner destination constraint. Note that on Lighter the withdrawal is signed by the registered API key (WASM blob), not the L1 wallet.
Builder-code support
placeOrder, placeTriggerOrder, and modifyOrder on Lighter carry the Lighter builder-code fields (integrator_account_index, integrator_taker_fee, integrator_maker_fee) in the unsigned WASM CreateOrder payload returned from /createAction. The integrator identifier is read from the x-lifi-integrator request header (see Authentication) or the SDK’s integrator client option — there is no dedicated request-body builderCode parameter on PlaceOrderParams, PlaceTriggerOrderParams, or ModifyOrderParams.
Builder-code is not yet wired up end-to-end. The backend currently hardcodes all three integrator fields to 0 — it threads the integrator identifier to the handlers but does not look up or inject any per-integrator builder-code config. The SDK’s LighterSigner likewise does not thread these fields through to the Go WASM SignCreateOrder binding. Orders submit and trade correctly today; only integrator-fee accounting is inert until both sides are wired. A follow-up issue tracks the fix.
Submitted (signed) payloads are validated on /executeAction against the values issued at /createAction via a generic payload-hash check — this is not builder-code-specific (and the builder-code fields are 0 either way).
Internal-only actions
The following action types exist in the Lighter provider’s internal registry but are deliberately not surfaced via GET /providers. They are reachable only through internal dispatch (e.g. the fastwithdraw rewrite) and cannot be invoked directly through the public action API:
| Internal action | Used by | Why hidden |
|---|
TRANSFER | WITHDRAWAL (fastwithdraw rewrite) | Exposing it would allow arbitrary balance transfers between Lighter accounts |
Margin modes
Lighter supports two margin modes per market, sourced from market_margin_mode in each market’s market_config (on orderBookDetails):
| Mode | Value | Description |
|---|
CROSS | 0 | Shared margin across positions |
ISOLATED | 1 | Per-position isolated margin |
Mode is configurable per asset via updateLeverage.