Skip to main content
This endpoint is only available to Growth and Enterprise plans.

Endpoint Details

Use this stream for perpetual trading activity: market orders, liquidations, limit orders, take profits, stop losses, and TP/SL updates.
  • Endpoint: wss://stream-perps-prod.mobula.io/
  • Event: order
  • Supported chains: lighter:301, lighter:304, evm:42161
  • Supported exchanges: Lighter and Gains Network
See the Perps Data Model for the full field reference.

Subscription Payload

{
  "type": "stream",
  "authorization": "YOUR_API_KEY",
  "payload": {
    "name": "LighterLiquidations",
    "chainIds": ["lighter:301", "lighter:304"],
    "events": ["order"],
    "filters": {
      "or": [
        { "eq": ["type", "LIQUIDATION_LONG"] },
        { "eq": ["type", "LIQUIDATION_SHORT"] }
      ]
    },
    "subscriptionId": "lighter-liquidations",
    "subscriptionTracking": true
  }
}

Response Frame

Every message uses the standard Multi-Events frame:
{
  "data": {
    "type": "LIQUIDATION_LONG",
    "exchange": "lighter",
    "market": "lighter-eth-usd",
    "account": "0x1234...",
    "price": 3450.12,
    "size": 1.5,
    "transactionHash": "0xabcd...",
    "date": "2026-06-08T00:18:34.613Z"
  },
  "chainId": "lighter:301",
  "duplicateCount": 1,
  "subscriptionId": "lighter-liquidations"
}

Order Types

  • MARKET_BUY
  • MARKET_SELL
  • LIQUIDATION_LONG
  • LIQUIDATION_SHORT
  • LIMIT_BUY
  • LIMIT_SELL
  • TAKE_PROFIT
  • STOP_LOSS
  • UPDATE_TP
  • UPDATE_SL

Common Filters

Liquidations

{
  "or": [
    { "eq": ["type", "LIQUIDATION_LONG"] },
    { "eq": ["type", "LIQUIDATION_SHORT"] }
  ]
}

Exchange

{
  "eq": ["exchange", "gains"]
}

Market Orders

{
  "or": [
    { "eq": ["type", "MARKET_BUY"] },
    { "eq": ["type", "MARKET_SELL"] }
  ]
}

Parameters

  • chainIds (required): Perps chain identifiers, for example ["lighter:301"].
  • events (required): Must include order.
  • filters (optional): Filter conditions. See filters.
  • subscriptionId (optional): Identifier copied into matching responses.
  • subscriptionTracking (optional, default: false): Include subscription details in response logs.
  • tag (optional): Usage tag shown in the dashboard breakdown.

Keepalive

{ "event": "ping" }

Unsubscribe

{
  "type": "unsubscribe",
  "authorization": "YOUR_API_KEY",
  "payload": {
    "subscriptionId": "lighter-liquidations"
  }
}