> ## Documentation Index
> Fetch the complete documentation index at: https://docs.roxom.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set TP/SL

> Adjust take profit and stop loss levels for a specific position.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/positions/set-tp-sl
openapi: 3.0.3
info:
  title: Portico API
  version: 0.1.0
servers:
  - url: https://api.roxom.com
security:
  - ApiKey: []
    ApiSignature: []
paths:
  /v1/positions/set-tp-sl:
    post:
      tags:
        - Positions
      summary: Set TP/SL
      description: Adjust take profit and stop loss levels for a specific position.
      operationId: post_v1-positions-set-tp-sl-81b68090e08b24630029d3ef2a8895a7
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetTakeProfitStopLossRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse_for_SetTpSlGaywayResponse'
      deprecated: false
components:
  schemas:
    SetTakeProfitStopLossRequest:
      title: SetTakeProfitStopLossRequest
      type: object
      required:
        - instType
        - symbol
        - tpSlMode
      properties:
        instType:
          $ref: '#/components/schemas/InstrumentType'
        quantity:
          type: string
          nullable: true
        stopLossLimitPrice:
          type: string
          nullable: true
        stopLossTriggerPrice:
          type: string
          nullable: true
        symbol:
          type: string
        takeProfitLimitPrice:
          type: string
          nullable: true
        takeProfitTriggerPrice:
          type: string
          nullable: true
        tpSlMode:
          $ref: '#/components/schemas/TPSLMode'
        unit:
          allOf:
            - $ref: '#/components/schemas/BtcUnits'
          nullable: true
    ApiResponse_for_SetTpSlGaywayResponse:
      title: ApiResponse_for_SetTpSlGaywayResponse
      description: Represents a successful API response wrapper
      type: object
      required:
        - data
        - error
      properties:
        data:
          $ref: '#/components/schemas/SetTpSlGaywayResponse'
        error:
          type: boolean
    InstrumentType:
      type: string
      enum:
        - perpetual
        - spot
        - btc
        - digital
        - stock
        - index
    TPSLMode:
      type: string
      enum:
        - partial
        - full
    BtcUnits:
      type: string
      enum:
        - sats
        - btc
    SetTpSlGaywayResponse:
      type: object
      properties:
        slOrder:
          allOf:
            - $ref: '#/components/schemas/Order'
          nullable: true
        tpOrder:
          allOf:
            - $ref: '#/components/schemas/Order'
          nullable: true
    Order:
      type: object
      required:
        - accountId
        - amountFilled
        - createdAt
        - id
        - instType
        - px
        - qty
        - side
        - size
        - status
        - symbol
        - timeInForce
        - type
        - unit
      properties:
        accountId:
          type: string
          format: uuid
        amountFilled:
          type: string
        cancelAt:
          type: integer
          format: int64
          nullable: true
        clientOrderId:
          type: string
          nullable: true
        createdAt:
          type: integer
          format: int64
        id:
          type: string
          format: uuid
        instType:
          $ref: '#/components/schemas/InstrumentType'
        px:
          type: string
        qty:
          type: string
        side:
          $ref: '#/components/schemas/OrderSide'
        size:
          type: string
        status:
          $ref: '#/components/schemas/OrderStatus'
        symbol:
          type: string
        timeInForce:
          $ref: '#/components/schemas/TimeInForce'
        triggerPx:
          type: string
          nullable: true
        triggeredAt:
          type: integer
          format: int64
          nullable: true
        type:
          $ref: '#/components/schemas/OrderType'
        unit:
          $ref: '#/components/schemas/BtcUnits'
    OrderSide:
      type: string
      enum:
        - buy
        - sell
    OrderStatus:
      type: string
      enum:
        - pendingsubmit
        - waitingtrigger
        - submitted
        - pendingcancel
        - partiallyfilled
        - partiallyfilledcancelled
        - filled
        - cancelled
        - rejected
        - inactive
    TimeInForce:
      type: string
      enum:
        - gtc
        - ioc
    OrderType:
      type: string
      enum:
        - limit
        - market
        - stop
        - stoplimit
        - take
        - takelimit
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your API key
    ApiSignature:
      type: apiKey
      in: header
      name: X-API-Signature
      description: The signature of the request

````