Skip to main content
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.
SignersAPI_KEY (WASM blob)
ParamsPlaceOrderParams{ market, side, type?, size, price?, leverage?, marginMode?, reduceOnly?, timeInForce?, expiresAt?, takeProfit?, stopLoss? }
SDK methodsplaceOrder()

cancelOrder

Cancels one or more open orders by ID.
SignersAPI_KEY (WASM blob)
ParamsCancelOrderParams{ ids }
SDK methodscancelOrders()

cancelAllOrders

Cancels every open order on the account. Lighter exposes this as a first-class WASM action (SignCancelAllOrders) rather than requiring per-order cancellation.
SignersAPI_KEY (WASM blob)
Params(none beyond the implicit account/key context)
SDK methodsDispatched 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.
SignersAPI_KEY (WASM blob)
ParamsModifyOrderParams{ modifications: [{ id, price?, size?, triggerPrice? }] }
SDK methodsmodifyOrders()

updateLeverage

Changes the leverage and/or margin mode (cross / isolated) for a market.
SignersAPI_KEY (WASM blob)
ParamsUpdateLeverageParams{ market, leverage, marginMode? }

updatePositionMargin

Adds or removes margin on an isolated position. Use this to adjust liquidation price without changing the position size.
SignersAPI_KEY (WASM blob)
ParamsUpdatePositionMarginParams{ market, action: 'add' | 'remove', amount }
SDK methodsupdatePositionMargin()
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 actionUsed byWhy hidden
TRANSFERWITHDRAWAL (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):
ModeValueDescription
CROSS0Shared margin across positions
ISOLATED1Per-position isolated margin
Mode is configurable per asset via updateLeverage.