---
title: "Set Trading Stop"
method: POST
path: "/api/v1/position/trading-stop"
tags: ["Position"]
---

# Set Trading Stop

`POST /api/v1/position/trading-stop`

## Request

- Base URL: `https://api.ekiden.fi`
- URL: `https://api.ekiden.fi/api/v1/position/trading-stop`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/ekidenfi/apis/ekiden-gateway/docs/api/v1/position/trading-stop/post.ts> (a function with typed inputs; its response is checked against the schema)

Set the take profit, stop loss or trailing stop for the position.

## Request body

- SetTradingStopRequest: Set the take profit, stop loss or trailing stop for the position.
  - `active_price` string, nullable
  - `sl_size` string, nullable: Stop loss size valid for TP/SL partial mode, note: the value of tpSize and slSize must equal
  - `sub_account_address` string, required
  - `symbol` string, required
  - `tp_size` string, nullable: Take profit size valid for TP/SL partial mode, note: the value of tpSize and slSize must equal
  - `tpsl` TpSl
    - `mode` 'Full' | 'Partial', required
    - `stop_loss` union
      - object
        - `market` object, required
          - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
          - `trigger_price` string, required
      - object
        - `limit` object, required
          - `limit_price` string, required
          - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
          - `trigger_price` string, required
    - `take_profit` union
      - object
        - `market` object, required
          - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
          - `trigger_price` string, required
      - object
        - `limit` object, required
          - `limit_price` string, required
          - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
          - `trigger_price` string, required
  - `trailing_stop` string, nullable

## Response `200`

Trading stop set

- SetTradingStopResponse: Response for setting trading stop.
  - `success` boolean, required
  - `time` string, date-time, required

## Changes

- **2026-01-29** `16fe50636aa5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/changes/api/v1/position/trading-stop/post.md)

---

[API](https://skmtc.dev/ekidenfi/apis/ekiden-gateway.md) - [All operations](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/ekidenfi/apis/ekiden-gateway/revisions/fad9eecaba2e?raw)
