> ## 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.

# Read a risk measure

> Read a measure until its status is not running. running gives progress: dates_done of dates_total. ok gives the answer: model (the version, its publications and base currency), units, factors (every factor any date has; each per-factor array follows this order, null where a date's publication lacks one), dates (one per date: ok with publication_date, the benchmark and each book, or missing with nearest_before and nearest_after), and warnings. Volatility and tracking error are annual decimals; shares are percent of variance; modelled_share_of_gross is a share of the book's gross weight, not of net assets. failed gives failure_code and reason: model_version_not_found (leave model.version out), answer_too_large or timed_out (split the books or the range), cancelled, or engine_fault (start again with a new request_key; if it fails again, the measure cannot run). Answers stay 24 hours after the measure ends. Names the model lacks stay out of this result. To add them, run the risk engine on the book: it adds each name it can score to the model's publications from the last two years. Then call this again. A name the run could not add comes back with its reason; not_added_in_time means the run stopped waiting first, so run it again later.

Operation ID: getRiskMeasure.



## OpenAPI

````yaml /openapi/itoflow-public.openapi.json get /risk/measure/{measure_id}
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}:
    get:
      tags:
        - Risk runs
      summary: Read a risk measure
      description: >-
        Read a measure until its status is not running. running gives progress:
        dates_done of dates_total. ok gives the answer: model (the version, its
        publications and base currency), units, factors (every factor any date
        has; each per-factor array follows this order, null where a date's
        publication lacks one), dates (one per date: ok with publication_date,
        the benchmark and each book, or missing with nearest_before and
        nearest_after), and warnings. Volatility and tracking error are annual
        decimals; shares are percent of variance; modelled_share_of_gross is a
        share of the book's gross weight, not of net assets. failed gives
        failure_code and reason: model_version_not_found (leave model.version
        out), answer_too_large or timed_out (split the books or the range),
        cancelled, or engine_fault (start again with a new request_key; if it
        fails again, the measure cannot run). Answers stay 24 hours after the
        measure ends. Names the model lacks stay out of this result. To add
        them, run the risk engine on the book: it adds each name it can score to
        the model's publications from the last two years. Then call this again.
        A name the run could not add comes back with its reason;
        not_added_in_time means the run stopped waiting first, so run it again
        later.


        Operation ID: getRiskMeasure.
      operationId: getRiskMeasure
      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_getRiskMeasureResponse'
          description: The measure
          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_getRiskMeasureResponse:
      oneOf:
        - additionalProperties: false
          properties:
            progress:
              $ref: '#/components/schemas/Gateway_RiskMeasureProgress'
              description: How many of the dates are done.
            status:
              const: running
              type: string
          required:
            - status
          type: object
        - additionalProperties: false
          properties:
            answer:
              $ref: '#/components/schemas/Gateway_RiskMeasureAnswer'
            status:
              const: ok
              type: string
          required:
            - status
            - answer
          type: object
        - $ref: '#/components/schemas/Gateway_RiskMeasureFailure'
    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
    Gateway_RiskMeasureProgress:
      additionalProperties: false
      properties:
        dates_done:
          maximum: 9007199254740991
          minimum: 0
          type: integer
        dates_total:
          maximum: 60
          minimum: 1
          type: integer
      required:
        - dates_done
        - dates_total
      type: object
    Gateway_RiskMeasureAnswer:
      additionalProperties: false
      properties:
        dates:
          description: One entry per date on the grid, oldest first.
          items:
            oneOf:
              - additionalProperties: false
                properties:
                  as_of:
                    description: The date on the grid.
                    format: date
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                    type: string
                  benchmark:
                    anyOf:
                      - additionalProperties: false
                        properties:
                          coverage:
                            additionalProperties: false
                            properties:
                              lookthrough_weight:
                                description: >-
                                  The gross weight of funds measured through
                                  their own holdings.
                                type:
                                  - number
                                  - 'null'
                              modelled_share_of_gross:
                                description: >-
                                  The share of the book's gross weight the model
                                  covers, 0 to 1: not a share of net assets.
                                  Cash in the model currency counts in neither
                                  part.
                                type:
                                  - number
                                  - 'null'
                              unmodelled:
                                description: >-
                                  The 100 largest lines the model left out, at
                                  most; unmodelled_count counts them all.
                                items:
                                  additionalProperties: false
                                  properties:
                                    reason:
                                      type: string
                                    reason_code:
                                      description: >-
                                        The engine names unmodelled,
                                        no_equity_listing, no_fund_book,
                                        invalid_inputs, not_listed and
                                        cash_currency today. It may add codes;
                                        reason says each one in words.
                                      minLength: 1
                                      type: string
                                    symbol:
                                      description: >-
                                        Caller's symbol for a catalogue gap;
                                        null only for an unnamed fund part not
                                        listed by its source; CASH for
                                        cash_currency.
                                      type:
                                        - string
                                        - 'null'
                                    weight:
                                      description: >-
                                        Null when the holding could not be
                                        valued; its weight is not known.
                                      type:
                                        - number
                                        - 'null'
                                  required:
                                    - symbol
                                    - weight
                                    - reason_code
                                    - reason
                                  type: object
                                type: array
                              unmodelled_count:
                                description: Every line the model left out, however many.
                                maximum: 9007199254740991
                                minimum: 0
                                type: integer
                            required:
                              - modelled_share_of_gross
                              - lookthrough_weight
                              - unmodelled_count
                              - unmodelled
                            type: object
                          fund_books:
                            default: []
                            items:
                              additionalProperties: false
                              properties:
                                accepted_at:
                                  anyOf:
                                    - format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                      type: string
                                    - type: 'null'
                                as_of:
                                  anyOf:
                                    - format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                      type: string
                                    - type: 'null'
                                book_id:
                                  type: string
                                fund_symbol:
                                  type: string
                                holdings_date:
                                  format: date
                                  pattern: >-
                                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                  type: string
                              required:
                                - book_id
                                - fund_symbol
                                - holdings_date
                                - as_of
                                - accepted_at
                              type: object
                            type: array
                          holdings_as_of:
                            format: date
                            pattern: >-
                              ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                            type: string
                          symbol:
                            type: string
                        required:
                          - symbol
                          - holdings_as_of
                          - fund_books
                          - coverage
                        type: object
                      - type: 'null'
                    description: >-
                      The benchmark fund's stored book on or before the
                      publication's model date, with its own coverage. Null with
                      no benchmark, or when the store holds no book for it.
                  books:
                    items:
                      oneOf:
                        - additionalProperties: false
                          properties:
                            active:
                              anyOf:
                                - additionalProperties: false
                                  properties:
                                    beta:
                                      type:
                                        - number
                                        - 'null'
                                    exposures:
                                      description: >-
                                        One exposure per factor, in the order of
                                        factors; null for a factor this date's
                                        publication lacks.
                                      items:
                                        type:
                                          - number
                                          - 'null'
                                      type: array
                                    factor_share:
                                      description: >-
                                        Percent of variance from factors; null
                                        with no variance.
                                      type:
                                        - number
                                        - 'null'
                                    factor_shares:
                                      description: >-
                                        Percent of variance per factor, in the
                                        order of factors; null for a factor this
                                        date's publication lacks, or with no
                                        variance.
                                      items:
                                        type:
                                          - number
                                          - 'null'
                                      type: array
                                    modelled_share_of_gross_active:
                                      description: >-
                                        The share of the gross active weight the
                                        model covers, 0 to 1: the book's and the
                                        benchmark's gaps netted by name.
                                      type: number
                                    specific_share:
                                      description: >-
                                        Percent of variance specific to names;
                                        null with no variance.
                                      type:
                                        - number
                                        - 'null'
                                    tracking_error:
                                      type: number
                                  required:
                                    - tracking_error
                                    - beta
                                    - modelled_share_of_gross_active
                                    - factor_share
                                    - specific_share
                                    - exposures
                                    - factor_shares
                                  type: object
                                - type: 'null'
                              description: >-
                                Null with no benchmark, when the store holds no
                                book for it on or before the publication's model
                                date, or when the book or the benchmark holds no
                                name the model covers; a warning says which.
                            coverage:
                              additionalProperties: false
                              properties:
                                lookthrough_weight:
                                  description: >-
                                    The gross weight of funds measured through
                                    their own holdings.
                                  type:
                                    - number
                                    - 'null'
                                modelled_share_of_gross:
                                  description: >-
                                    The share of the book's gross weight the
                                    model covers, 0 to 1: not a share of net
                                    assets. Cash in the model currency counts in
                                    neither part.
                                  type:
                                    - number
                                    - 'null'
                                unmodelled:
                                  description: >-
                                    The 100 largest lines the model left out, at
                                    most; unmodelled_count counts them all.
                                  items:
                                    additionalProperties: false
                                    properties:
                                      reason:
                                        type: string
                                      reason_code:
                                        description: >-
                                          The engine names unmodelled,
                                          no_equity_listing, no_fund_book,
                                          invalid_inputs, not_listed and
                                          cash_currency today. It may add codes;
                                          reason says each one in words.
                                        minLength: 1
                                        type: string
                                      symbol:
                                        description: >-
                                          Caller's symbol for a catalogue gap;
                                          null only for an unnamed fund part not
                                          listed by its source; CASH for
                                          cash_currency.
                                        type:
                                          - string
                                          - 'null'
                                      weight:
                                        description: >-
                                          Null when the holding could not be
                                          valued; its weight is not known.
                                        type:
                                          - number
                                          - 'null'
                                    required:
                                      - symbol
                                      - weight
                                      - reason_code
                                      - reason
                                    type: object
                                  type: array
                                unmodelled_count:
                                  description: Every line the model left out, however many.
                                  maximum: 9007199254740991
                                  minimum: 0
                                  type: integer
                              required:
                                - modelled_share_of_gross
                                - lookthrough_weight
                                - unmodelled_count
                                - unmodelled
                              type: object
                            exposure:
                              anyOf:
                                - additionalProperties: false
                                  properties:
                                    gross_weight:
                                      type: number
                                    long_weight:
                                      type: number
                                    net_weight:
                                      type: number
                                    short_weight:
                                      type: number
                                  required:
                                    - long_weight
                                    - short_weight
                                    - gross_weight
                                    - net_weight
                                  type: object
                                - type: 'null'
                            fund_books:
                              default: []
                              items:
                                additionalProperties: false
                                properties:
                                  accepted_at:
                                    anyOf:
                                      - format: date-time
                                        pattern: >-
                                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                        type: string
                                      - type: 'null'
                                  as_of:
                                    anyOf:
                                      - format: date-time
                                        pattern: >-
                                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                        type: string
                                      - type: 'null'
                                  book_id:
                                    type: string
                                  fund_symbol:
                                    type: string
                                  holdings_date:
                                    format: date
                                    pattern: >-
                                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                    type: string
                                required:
                                  - book_id
                                  - fund_symbol
                                  - holdings_date
                                  - as_of
                                  - accepted_at
                                type: object
                              type: array
                            holdings_as_of:
                              anyOf:
                                - anyOf:
                                    - format: date-time
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                      type: string
                                    - format: date
                                      pattern: >-
                                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                                      type: string
                                - type: 'null'
                              description: >-
                                When the saved snapshot was taken; null for a
                                list of weights.
                            label:
                              type: string
                            risk:
                              anyOf:
                                - additionalProperties: false
                                  properties:
                                    exposures:
                                      description: >-
                                        One exposure per factor, in the order of
                                        factors; null for a factor this date's
                                        publication lacks.
                                      items:
                                        type:
                                          - number
                                          - 'null'
                                      type: array
                                    factor_share:
                                      description: >-
                                        Percent of variance from factors; null
                                        with no variance.
                                      type:
                                        - number
                                        - 'null'
                                    factor_shares:
                                      description: >-
                                        Percent of variance per factor, in the
                                        order of factors; null for a factor this
                                        date's publication lacks, or with no
                                        variance.
                                      items:
                                        type:
                                          - number
                                          - 'null'
                                      type: array
                                    specific_share:
                                      description: >-
                                        Percent of variance specific to names;
                                        null with no variance.
                                      type:
                                        - number
                                        - 'null'
                                    total_volatility:
                                      type: number
                                  required:
                                    - total_volatility
                                    - factor_share
                                    - specific_share
                                    - exposures
                                    - factor_shares
                                  type: object
                                - type: 'null'
                              description: Null when no risky name in the book is modelled.
                            status:
                              const: ok
                              type: string
                            top_names:
                              items:
                                additionalProperties: false
                                properties:
                                  share:
                                    type: number
                                  symbol:
                                    type: string
                                  weight:
                                    type: number
                                required:
                                  - symbol
                                  - weight
                                  - share
                                type: object
                              type: array
                          required:
                            - label
                            - status
                            - fund_books
                            - holdings_as_of
                            - exposure
                            - coverage
                            - risk
                            - active
                            - top_names
                          type: object
                        - additionalProperties: false
                          properties:
                            label:
                              type: string
                            reason:
                              enum:
                                - no_holdings_at_date
                                - holdings_valuation_unknown
                              type: string
                            status:
                              const: omitted
                              type: string
                          required:
                            - label
                            - status
                            - reason
                          type: object
                    type: array
                  provenance:
                    additionalProperties: false
                    properties:
                      snapshot_instant:
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                        type: string
                    required:
                      - snapshot_instant
                    type: object
                  publication_date:
                    description: >-
                      The publication this date read: the newest on or before
                      as_of. Dates that share one read the same books, but each
                      date checks the age of inputs carried forward, so their
                      figures can differ.
                    format: date
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                    type: string
                  status:
                    const: ok
                    type: string
                  warnings:
                    items:
                      type: string
                    type: array
                required:
                  - as_of
                  - status
                  - publication_date
                  - benchmark
                  - books
                  - warnings
                  - provenance
                type: object
              - additionalProperties: false
                properties:
                  as_of:
                    format: date
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                    type: string
                  nearest_after:
                    anyOf:
                      - format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        type: string
                      - type: 'null'
                    description: The oldest model date after this one; null when none.
                  nearest_before:
                    anyOf:
                      - format: date
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                        type: string
                      - type: 'null'
                    description: The newest model date before this one; null when none.
                  reason:
                    type: string
                  reason_code:
                    const: model_date_unavailable
                    type: string
                  status:
                    const: missing
                    type: string
                required:
                  - as_of
                  - status
                  - reason_code
                  - reason
                  - nearest_before
                  - nearest_after
                type: object
          type: array
        factors:
          description: >-
            Every factor any date's publication has, once. Each per-factor array
            follows this order.
          items:
            additionalProperties: false
            properties:
              group:
                type:
                  - string
                  - 'null'
              id:
                type: string
              name:
                type: string
            required:
              - id
              - name
              - group
            type: object
          type: array
        model:
          additionalProperties: false
          properties:
            base_currency:
              type:
                - string
                - 'null'
            dates:
              additionalProperties: false
              description: >-
                The version's publications: month-end ones from month_ends_from,
                daily ones from daily_from.
              properties:
                daily_from:
                  anyOf:
                    - format: date
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      type: string
                    - type: 'null'
                month_ends_from:
                  anyOf:
                    - format: date
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      type: string
                    - type: 'null'
              required:
                - month_ends_from
                - daily_from
              type: object
            version:
              description: The one model version every date used.
              type: string
          required:
            - version
            - dates
            - base_currency
          type: object
        provenance:
          additionalProperties: false
          properties:
            classification_inputs:
              const: current_static
              type: string
            factor_count:
              maximum: 9007199254740991
              minimum: 0
              type: integer
          required:
            - classification_inputs
            - factor_count
          type: object
        requested:
          additionalProperties: false
          description: The request as the measure read it, with defaults filled.
          properties:
            benchmark:
              description: >-
                A fund, such as SPY.US. Its stored holdings book on or before
                the publication's model date gives each book active risk;
                without one, active is null and a warning says why.
              maxLength: 32
              minLength: 1
              type: string
            books:
              description: 1 to 10 books, each a saved portfolio or a list of weights.
              items:
                anyOf:
                  - additionalProperties: false
                    properties:
                      label:
                        description: >-
                          Your name for the book. Labels are unique within a
                          call.
                        maxLength: 80
                        minLength: 1
                        type: string
                      portfolio:
                        additionalProperties: false
                        properties:
                          holdings_at:
                            anyOf:
                              - format: date-time
                                pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                type: string
                              - pattern: >-
                                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                                type: string
                            description: >-
                              A time with its offset, such as
                              2026-07-31T20:00:00Z. The book is the newest saved
                              snapshot on or before it. Omitted with no as_of or
                              range: the newest snapshot at the measure's start
                              time, shared by every book. A dated request uses
                              the end of the publication's model date in New
                              York.
                          portfolio_id:
                            description: A saved portfolio you own.
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                            type: string
                        required:
                          - portfolio_id
                        type: object
                    required:
                      - label
                      - portfolio
                    type: object
                  - additionalProperties: false
                    properties:
                      holdings:
                        description: >-
                          1 to 3000 lines, as fractions of net assets. With a
                          CASH line the weights add to 1, within 0.01. Without
                          one, the rest of the book is cash; a book that borrows
                          lists CASH below zero. Nothing is rescaled.
                        items:
                          additionalProperties: false
                          properties:
                            symbol:
                              description: >-
                                Ticker symbol such as NVDA.US; a bare ticker
                                means its US listing. CASH is US dollars.
                              maxLength: 32
                              minLength: 1
                              type: string
                            weight:
                              description: >-
                                Fraction of the portfolio's net assets, so 0.25
                                is 25%. A short is below zero, and CASH holds
                                what its sale raised.
                              type: number
                          required:
                            - symbol
                            - weight
                          type: object
                        maxItems: 3000
                        minItems: 1
                        type: array
                      label:
                        description: >-
                          Your name for the book. Labels are unique within a
                          call.
                        maxLength: 80
                        minLength: 1
                        type: string
                    required:
                      - label
                      - holdings
                    type: object
              maxItems: 10
              minItems: 1
              type: array
            model:
              additionalProperties: false
              default: {}
              description: >-
                Which dates of the factor model to measure on. Neither as_of nor
                range: the version's newest publication.
              properties:
                as_of:
                  description: >-
                    One date, YYYY-MM-DD, not after today in New York. The
                    newest publication on or before it counts. Not with range.
                  format: date
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                  type: string
                range:
                  additionalProperties: false
                  description: >-
                    A range of model dates, at most 60. Each date reads the
                    newest publication on or before it.
                  properties:
                    from:
                      description: YYYY-MM-DD, on or before to.
                      format: date
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      type: string
                    step:
                      default: month_end
                      description: >-
                        month_end: the last day of each month in the range, and
                        to when it is not one. daily: each weekday in the range.
                      enum:
                        - month_end
                        - daily
                      type: string
                    to:
                      description: YYYY-MM-DD, not after today in New York.
                      format: date
                      pattern: >-
                        ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
                      type: string
                  required:
                    - from
                    - to
                    - step
                  type: object
                version:
                  description: >-
                    A factor model version. Omitted: the version live when the
                    measure starts. Every date uses it.
                  maxLength: 200
                  minLength: 1
                  type: string
              type: object
            top_names:
              default: 10
              description: >-
                How many names to list by their share of each book's risk, 0 to
                50.
              maximum: 50
              minimum: 0
              type: integer
          required:
            - model
            - books
            - top_names
          type: object
        units:
          additionalProperties: false
          properties:
            shares:
              type: string
            volatility:
              type: string
            weights:
              type: string
          required:
            - volatility
            - weights
            - shares
          type: object
        warnings:
          description: Warnings for the whole measure, such as names left out on any date.
          items:
            type: string
          type: array
      required:
        - requested
        - model
        - units
        - factors
        - dates
        - warnings
        - provenance
      type: object
    Gateway_RiskMeasureFailure:
      additionalProperties: false
      properties:
        details:
          additionalProperties: {}
          description: answer_too_large gives size_bytes and limit_bytes.
          propertyNames:
            type: string
          type: object
        failure_code:
          enum:
            - model_version_not_found
            - answer_too_large
            - engine_fault
            - timed_out
            - cancelled
          type: string
        reason:
          description: Why, in a sentence.
          maxLength: 4096
          minLength: 1
          type: string
        status:
          const: failed
          type: string
      required:
        - status
        - failure_code
        - reason
        - details
      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.