Lighter icon

Lighter

Interact with Lighter (zkLighter) DEX API - High-performance perpetuals trading

Trading → Create Take Profit Limit Order

AI-generated

Summary

Create a take-profit limit order that triggers at a specified price and executes at a configurable execution price on the selected market.

Inputs

  • tradingMarketIndex (required) — Market index (0=ETH, 1=BTC, 2=SOL, etc.)
  • tradingSide (required) — Order side: buy (long) or sell (short)
  • tradingSize (required) — Order size in base asset
  • tradingReduceOnly — Whether order can only reduce an existing position (recommended true for TP/SL)
  • tradingTriggerPrice — Price that triggers the conditional order
  • tradingExecutionPrice — Price at which order executes after trigger (leave 0 to use trigger price)

Output shape

object

JSON response from the Lighter trading backend confirming order creation, including order ID, status, and market details.

Links

Discussion