# Trigger Order

A reusable object representing a stop loss or take profit order attached to a position or limit order. Used in [`positions`](/for-partners/endpoints/user-positions.md) and [`orders`](/for-partners/endpoints/user-orders.md) 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

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

```json
{
  "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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dexpal.io/for-partners/schemas/trigger-order.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
