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

# set Csv Close Alert

> Also requires datasets:read, a verified account primary email, current source read permission and a stock ticker. No arbitrary recipients. Up to50 active files per user, four distinct rules each. Strict above/below comparisons against completed raw Alpaca IEX daily closes, five minutes after the XNYS scheduled regular-session close (including early closes). IEX is not a consolidated official auction close. Quantile rules require daily predictions and match the same New York date, skipping crossed rows. Fixed thresholds allow other prediction frequencies. Checks apply only to sessions closing after enablement; one digest per matching trading date, at most seven days catch-up, 90-day subscription expiry. Unknown email outcomes pause for review. Does not execute trades or run models. Disabling discards queued conditions; an email already handed to the provider cannot be recalled.



## OpenAPI

````yaml /docs/api/openapi.json put /v1/csv-imports/{id}/close-alert
openapi: 3.1.0
info:
  title: Quantura API
  version: 1.0.0
  description: >-
    Search markets and public datasets, download historical observations, create
    forecasts and inspect screener quantiles.
  contact:
    name: Quantura
    url: https://quantura.studio/contact
  license:
    name: Quantura API Terms
    url: https://quantura.studio/terms
servers:
  - url: https://quantura.studio/api
security:
  - bearerAuth: []
  - clerkOAuth:
      - openid
      - profile
      - email
tags:
  - name: Access
  - name: Forecast
  - name: Screener
  - name: Admin Canvas
  - name: CSV library
  - name: Privacy
  - name: Search
  - name: Download
  - name: Scout
paths:
  /v1/csv-imports/{id}/close-alert:
    servers:
      - url: https://quantura.studio/api
    put:
      tags:
        - CSV library
      summary: set Csv Close Alert
      description: >-
        Also requires datasets:read, a verified account primary email, current
        source read permission and a stock ticker. No arbitrary recipients. Up
        to50 active files per user, four distinct rules each. Strict above/below
        comparisons against completed raw Alpaca IEX daily closes, five minutes
        after the XNYS scheduled regular-session close (including early closes).
        IEX is not a consolidated official auction close. Quantile rules require
        daily predictions and match the same New York date, skipping crossed
        rows. Fixed thresholds allow other prediction frequencies. Checks apply
        only to sessions closing after enablement; one digest per matching
        trading date, at most seven days catch-up, 90-day subscription expiry.
        Unknown email outcomes pause for review. Does not execute trades or run
        models. Disabling discards queued conditions; an email already handed to
        the provider cannot be recalled.
      operationId: setCsvCloseAlert
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^(?:[a-f0-9]{64}|(?:csv_|legacy_)[A-Za-z0-9_-]+)$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CsvCloseAlert'
      responses:
        '200':
          description: >-
            Saved personal subscription. email_configured=false explicitly means
            email cannot currently be sent.
          content:
            application/json:
              schema:
                type: object
              example:
                data:
                  success: true
                meta:
                  api_version: v1
        '401':
          description: Sign-in required
          content:
            application/json:
              schema:
                type: object
        '403':
          description: Scope, current membership or CSV permission denied
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                type: object
        '409':
          description: >-
            Conflicting request ID or an unconfirmed write; do not blindly retry
            with a new ID
          content:
            application/json:
              schema:
                type: object
        '412':
          description: Connect Google and grant drive.file
          content:
            application/json:
              schema:
                type: object
        '413':
          description: Decoded CSV or Sheets export limit exceeded
          content:
            application/json:
              schema:
                type: object
        '422':
          description: CSV, type, mapping, metrics or metadata invalid
          content:
            application/json:
              schema:
                type: object
        '503':
          description: Provider unavailable; source data is retained
          content:
            application/json:
              schema:
                type: object
      security:
        - bearerAuth: []
        - clerkOAuth:
            - openid
            - profile
            - email
components:
  schemas:
    CsvCloseAlert:
      type: object
      additionalProperties: false
      required:
        - enabled
        - rules
      properties:
        enabled:
          type: boolean
          description: Explicit personal opt-in; false disables queued conditions.
        rules:
          type: array
          maxItems: 4
          items:
            oneOf:
              - type: object
                additionalProperties: false
                required:
                  - kind
                  - direction
                  - value
                properties:
                  kind:
                    const: price
                  direction:
                    enum:
                      - above
                      - below
                  value:
                    type: number
                    exclusiveMinimum: 0
                    maximum: 1000000000
              - type: object
                additionalProperties: false
                required:
                  - kind
                  - direction
                  - quantile
                properties:
                  kind:
                    const: quantile
                  direction:
                    enum:
                      - above
                      - below
                  quantile:
                    type: string
                    pattern: ^P(?:100|[0-9]{1,2})(?:\.[0-9]{1,6})?$
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Clerk personal API key or legacy Quantura key
    clerkOAuth:
      type: oauth2
      description: >-
        Clerk authorization code with PKCE S256. Pass
        resource=https://quantura.studio on authorization and token requests.
        Paid Pro, enterprise or verified administrator API access is required.
      flows:
        authorizationCode:
          authorizationUrl: https://clerk.quantura.studio/oauth/authorize
          tokenUrl: https://clerk.quantura.studio/oauth/token
          refreshUrl: https://clerk.quantura.studio/oauth/token
          scopes:
            openid: Identify the Quantura account
            profile: Resolve the account profile
            email: Verify account email
            offline_access: Refresh access after expiry

````

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