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

# Stop a risk measure

> Stop a measure by its measure_id. cancelled is false when it had already ended.

Operation ID: cancelRiskMeasure.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json post /risk/measure/{measure_id}/cancel
openapi: 3.1.0
info:
  description: >-
    All Itoflow APIs are experimental and may change without notice. Read-only
    operations marked interactive can be tried from the documentation; the
    others are reference-only.
  title: Itoflow Developer API
  version: 1.0.0
servers:
  - description: Itoflow API
    url: https://api.itoflow.ai
security: []
tags:
  - name: Account
  - name: Billing
  - name: Brokers
  - name: Chat
  - name: Connected MCP servers
  - name: GitHub
  - name: Market data
  - name: Monitors
  - name: Notifications
  - name: Portfolios
  - name: Risk runs
  - name: Sharing and data
  - name: Strategies
paths:
  /risk/measure/{measure_id}/cancel:
    post:
      tags:
        - Risk runs
      summary: Stop a risk measure
      description: >-
        Stop a measure by its measure_id. cancelled is false when it had already
        ended.


        Operation ID: cancelRiskMeasure.
      operationId: cancelRiskMeasure
      parameters:
        - in: path
          name: measure_id
          required: true
          schema:
            pattern: ^measure-[0-9a-f]{32}$
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gateway_cancelRiskMeasureResponse'
          description: Whether a measure was stopped
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gateway_RiskMeasureError'
          description: No session or API bearer.
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gateway_RiskMeasureError'
          description: >-
            measure_not_found: no measure of yours has this id, or its answer is
            past its 24 hours.
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Gateway_RiskMeasureError'
          description: >-
            risk_engine_unavailable: the risk engine did not answer. Retry the
            same call; a start with the same request_key joins the measure it
            may have started.
          headers:
            Cache-Control:
              schema:
                const: no-store
                type: string
            Retry-After:
              description: Seconds to wait before calling again.
              schema:
                minimum: 1
                type: integer
      security:
        - bearerAuth: []
components:
  schemas:
    Gateway_cancelRiskMeasureResponse:
      additionalProperties: false
      properties:
        cancelled:
          type: boolean
      required:
        - cancelled
      type: object
    Gateway_RiskMeasureError:
      additionalProperties: false
      properties:
        error:
          additionalProperties: false
          properties:
            code:
              type: string
            details:
              additionalProperties: {}
              propertyNames:
                type: string
              type: object
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: Itoflow access token issued for the Itoflow API.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.