Lighter icon

Lighter

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

Trading → Cancel Order

AI-generated

Summary

Cancels a specific order

Inputs

  • tradingMarketIndex — Market index (0=ETH, 1=BTC, 2=SOL, etc.)
  • tradingOrderIndex — The order index to cancel

Output shape

JSON response from the Lighter backend confirming order cancellation

Returns the backend's order cancellation confirmation as a JSON object

Examples

Example 1: Cancel a specific order on the ETH market

Set tradingMarketIndex to 0 and tradingOrderIndex to the desired order's index

Links

Discussion