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

# Risk Settings Set

> Set risk thresholds (stop-loss/take-profit) for a position.

Creates or updates risk settings. The scheduler monitors positions every 15 minutes
and automatically triggers a sell when thresholds are hit.

Parameters:
- market_id: The market ID
- side: Which side of the position ('yes' or 'no')
- stop_loss_pct: Trigger sell if P&L drops below this % (default: 0.50 = -50%)
- take_profit_pct: Trigger sell if P&L rises above this % (default: off)

At least one threshold must be set. Position data is derived from real_trades (not stored).

**Stop-loss is on by default** — every buy gets a 50% stop-loss automatically. Take-profit is off by default (prediction markets resolve naturally). Use this endpoint to set or override thresholds for a specific position.


## OpenAPI

````yaml /openapi.json post /api/sdk/positions/{market_id}/monitor
openapi: 3.1.0
info:
  title: Simmer API
  description: Agent-native trading infrastructure for prediction markets.
  version: 1.0.0
servers:
  - url: https://api.simmer.markets
security: []
paths:
  /api/sdk/positions/{market_id}/monitor:
    post:
      summary: Risk Settings Set
      description: >-
        Set risk thresholds (stop-loss/take-profit) for a position.


        Creates or updates risk settings. The scheduler monitors positions every
        15 minutes

        and automatically triggers a sell when thresholds are hit.


        Parameters:

        - market_id: The market ID

        - side: Which side of the position ('yes' or 'no')

        - stop_loss_pct: Trigger sell if P&L drops below this % (default: 0.50 =
        -50%)

        - take_profit_pct: Trigger sell if P&L rises above this % (default: off)


        At least one threshold must be set. Position data is derived from
        real_trades (not stored).
      operationId: api_sdk_risk_settings_set_api_sdk_positions__market_id__monitor_post
      parameters:
        - name: market_id
          in: path
          required: true
          schema:
            type: string
            title: Market Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SDKRiskSettingsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SDKRiskSettingsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SDKRiskSettingsRequest:
      properties:
        side:
          type: string
          enum:
            - 'yes'
            - 'no'
          title: Side
        stop_loss_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Stop Loss Pct
        take_profit_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Take Profit Pct
        venue:
          type: string
          title: Venue
          default: polymarket
      type: object
      required:
        - side
      title: SDKRiskSettingsRequest
      description: Request to set risk thresholds for a position.
    SDKRiskSettingsResponse:
      properties:
        success:
          type: boolean
          title: Success
        market_id:
          type: string
          title: Market Id
        side:
          type: string
          title: Side
        stop_loss_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Stop Loss Pct
        take_profit_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Take Profit Pct
        message:
          type: string
          title: Message
        shares:
          anyOf:
            - type: number
            - type: 'null'
          title: Shares
        cost_basis:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost Basis
      type: object
      required:
        - success
        - market_id
        - side
        - message
      title: SDKRiskSettingsResponse
      description: Response from risk settings endpoints.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````