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

# Update risk rules

> Update account-level trading safeguards.

Use this endpoint to change account-wide safeguards such as max order size, daily loss, open positions, order rate, cooldowns, and approval thresholds.

Review changes carefully before saving. These settings affect live trading controls for the authenticated account. API keys need `risk:write`.

```bash theme={null}
curl https://api.useblueprints.ai/api/risk-rules \
  -X PUT \
  -H "Authorization: Bearer bp_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"maxOrderSize":100,"maxDailyLoss":250,"maxOpenPositions":5}'
```


## OpenAPI

````yaml /openapi.yaml PUT /api/risk-rules
openapi: 3.1.0
info:
  title: Blueprints API
  version: '1.0'
  description: >-
    API for approved Blueprints product clients and integrations. Account
    resources require bearer authentication.
servers:
  - url: https://api.useblueprints.ai
security:
  - apiKeyBearer: []
tags:
  - name: Health
    description: Service status endpoints that do not require authentication.
  - name: Market data
    description: Authenticated read-only helpers for finding supported market inputs.
  - name: Blueprints
    description: Create, inspect, update, deploy, and stop account-owned blueprints.
  - name: Orders
    description: Read account order activity.
  - name: Portfolio
    description: Read account-level balances, positions, and portfolio summary data.
  - name: Risk rules
    description: Read and update account-level trading safeguards.
  - name: API keys
    description: Manage API keys used by trusted external integrations and MCP clients.
paths:
  /api/risk-rules:
    put:
      tags:
        - Risk rules
      summary: Update risk rules
      description: >-
        Updates account-level safeguards such as order size, daily loss, open
        position, order-rate, cooldown, and approval thresholds. API keys need
        the `risk:write` scope.
      operationId: updateRiskRules
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RiskRules'
      responses:
        '200':
          description: Updated risk rules.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RiskRules'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    RiskRules:
      type: object
      properties:
        maxOrderSize:
          type: number
        maxDailyLoss:
          type: number
        maxOpenPositions:
          type: number
        maxOrdersPerMinute:
          type: number
        cooldownAfterLossSec:
          type: number
        requireApprovalAbove:
          type: number
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
        message:
          type: string
  responses:
    Unauthorized:
      description: Missing, invalid, revoked, or expired credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Credential is valid but cannot perform this action.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKeyBearer:
      type: http
      scheme: bearer
      bearerFormat: bp_ API key
      x-default: bp_YOUR_API_KEY

````