Lighter icon

Lighter

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

Trading → Create Take Profit Order

AI-generated

Summary

Create a take-profit order that triggers at a specific price on the Lighter trading backend.

Inputs

  • tradingMarketIndex — Market index (0=ETH, 1=BTC, 2=SOL, etc.)
  • tradingSide — Order side: buy (long) or sell (short)
  • tradingSize — 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

JSON object from the Lighter trading backend containing order confirmation details

Returned as a paired item in the n8n workflow execution.

Examples

Example 1: Create a take-profit buy order for ETH at a trigger price of 2000

Set tradingMarketIndex to 0, tradingSide to 'buy', tradingSize to desired amount, tradingTriggerPrice to 2000, and optionally tradingExecutionPrice or leave at 0 to use trigger price.

Links

Discussion