For the complete documentation index, see llms.txt. This page is also available as Markdown.

Trigger Order

A reusable object representing a stop loss or take profit order attached to a position or limit order. Used in positions and orders as a nested array.

Schema

Field
Type
Required
Description

action

enum

yes

Type of trigger. takeProfit or stopLoss.

triggerPrice

number

yes

Price at which the order fires, in quote currency.

amountPercent

number

yes

Percentage of the position to close when triggered. 100 = close entire position.

createdAt

ISO8601

yes

Timestamp when the trigger order was created.

Example

{
  "action": "takeProfit",
  "triggerPrice": 70000.0,
  "amountPercent": 100.0,
  "createdAt": "2024-09-06T23:00:00Z"
}
{
  "action": "stopLoss",
  "triggerPrice": 58000.0,
  "amountPercent": 100.0,
  "createdAt": "2024-09-06T23:00:00Z"
}

Notes

  • A single position or order may have multiple trigger orders at different price points (e.g. partial take profits).

  • amountPercent values across multiple triggers do not need to sum to 100 — DEX behaviour varies.

  • Not all DEXes support trigger orders on limit orders. Return an empty array if not applicable.

Last updated