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.SDK). 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. Attached take-profit and stop-loss wires remain part of this placeOrder step. Standalone trigger orders use the separate placeTriggerOrder action below.
On Lighter spot markets
placeOrder rejects features that only exist for perpetuals: a validation error is thrown for reduceOnly, for bundled take-profit / stop-loss legs, and for any order type other than MARKET or LIMIT.
placeTriggerOrder
Places standalone take-profit or stop-loss orders for an existing position. Each trigger can omit size to track the full position or set a fixed base-asset size for a partial close.
placeTwapOrder
Places a TWAP parent as an ordinary signed order with order_type = 6, rather than through a dedicated TWAP transaction type. The engine fires a market sub-order every 30 seconds until the parent’s order_expiry.
durationSeconds sets the parent’s order_expiry as an absolute timestamp (now + durationSeconds * 1000) rather than the -1 default-expiry sentinel a limit order uses, and must fall within [300, 2592000] seconds (5 minutes–30 days). TWAP orders are perps-only — a spot marketId is rejected. Because the wire still requires a bounding price even though sub-orders fill at market, the parent signs the extremum in its own trade direction (max for a buy, min for a sell) so its own limit can never bind.
placeTwapOrder’s result carries a submit-time transaction hash on both orderId and twapId — Lighter assigns the parent’s real order index asynchronously. That hash is not a valid cancelTwapOrder input; read the real index back via getRunningTwaps once assigned.
cancelOrder
Cancels one or more open orders by ID. Lighter order IDs (order_index) are scoped per market, so supply the market context: pass the composite "<market_id>:<order_id>" form in ids, or set assetId to the order’s market.id.
cancelTwapOrder
Cancels a running TWAP parent by emitting the same signed cancel-order blob as cancelOrder, keyed by the parent’s order index, rather than through a TWAP-specific cancel transaction.
twapId is the parent’s order index as a decimal string. Order indexes are scoped per market, so market supplies the disambiguating market_index.
cancelAllOrders
Cancels every open order on the account. Lighter exposes this as a first-class WASM action (SignCancelAllOrders) rather than requiring per-order cancellation.
modifyOrder
Modifies one or more existing orders in-place — change price, size, or trigger parameters without cancelling and re-placing.
updateLeverage
Changes the leverage and/or margin mode (cross / isolated) for a market.
updatePositionMargin
Adds or removes margin on an isolated position. Use this to adjust liquidation price without changing the position size.
updateAssetCollateral
Opts a single spot asset in or out of the account’s cross-margin collateral pool. Valid only within a Unified Trading Account (accountMode = unifiedTradingAccount); on a Simple account the per-asset collateral flag does not exist and the action is rejected. Describes an L2UpdateAccountAssetConfig (tx type 42) WASM blob signed by the API key and relayed through /sendTx. Idempotent — a no-op when the asset is already in the requested state.
sendAsset
Moves the deployment collateral between the account’s perpetual and spot balances — USDC on lighter, USDG on lighter-rh. This is a same-account route transfer, not a withdrawal. sourceDex and destinationDex are perps and spot.
Deposits are documented on Deposits. The user wallet authorizes the deployment-specific EVM deposit flow; resolve its chain and collateral throughgetDepositFlow()rather than assuming Ethereum/USDC forlighter-rh.
Withdrawals are documented on Withdrawals, including per-asset/per-route discovery and the standard versus fast settlement paths. Provider metadata exposes the signer as SDK; the L1 wallet is not prompted.
Integrator fees
placeOrder, placeTriggerOrder, and modifyOrder on Lighter carry the integrator-fee 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 parameter for it on PlaceOrderParams, PlaceTriggerOrderParams, or ModifyOrderParams.
Per-order fees resolve end-to-end. The backend derives the rate for the request’s integrator (clamped to a maximum bps cap) and injects it into the three fields, and the SDK’s LighterSigner threads them through to the Go WASM SignCreateOrder binding. The fields fall back to zero (no integrator fee) when LI.FI’s integrator account is not provisioned or the resolved rate is zero. A non-zero fee applies only once the account has satisfied the approveIntegrator setup gate.
Submitted (signed) payloads are validated on /executeAction against the values issued at /createAction via a generic payload-hash check; the integrator-fee fields are part of the hashed payload like any other field.
Internal-only actions
The following action types exist in the Lighter provider’s internal registry but are deliberately not surfaced viaGET /providers. They are reachable only through internal dispatch (e.g. the fastwithdraw rewrite) and cannot be invoked directly through the public action API:
Margin modes
Lighter supports two margin modes per market, sourced frommarket_margin_mode in each market’s market_config (on orderBookDetails):
Mode is configurable per asset via
updateLeverage.