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

# Upload stock data



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/MarketData/UploadStockData
openapi: 3.0.1
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - description: Derivitec Server
    url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
paths:
  /api/MarketData/UploadStockData:
    post:
      tags:
        - MarketData
      summary: Upload stock data
      operationId: UploadStockData
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiUploadStockDataRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiUploadStockDataRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiUploadStockDataRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiUploadStockDataRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiBaseResponseEnvelope'
          description: Success
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiUploadStockDataRequest:
      example:
        stock_data:
          - date: '2000-01-23T04:56:07.000+00:00'
            volume: 5.637376656633329
            identifier:
              code: code
              market_identification_code: market_identification_code
              identifier_type: Derivitec
            split_factor: 2.3021358869347655
            high: 6.027456183070403
            low: 1.4658129805029452
            currency: currency
            close: 0.8008281904610115
            open: 5.962133916683182
          - date: '2000-01-23T04:56:07.000+00:00'
            volume: 5.637376656633329
            identifier:
              code: code
              market_identification_code: market_identification_code
              identifier_type: Derivitec
            split_factor: 2.3021358869347655
            high: 6.027456183070403
            low: 1.4658129805029452
            currency: currency
            close: 0.8008281904610115
            open: 5.962133916683182
      properties:
        market_data_environment_name:
          nullable: true
          type: string
        provider_id:
          nullable: true
          type: string
        stock_data:
          items:
            $ref: '#/components/schemas/StockData'
          nullable: true
          type: array
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiUploadStockDataRequest,
              Derivitec.Web.Core
      required:
        - $type
      type: object
    ApiBaseResponseEnvelope:
      description: >-
        Outcome of an operation that returns a success indicator and error
        messages without a domain-specific payload.
      example:
        $type: Derivitec.Web.Core.ApiBaseResponse, Derivitec.Web.Core
        is_success: true
        error_messages: []
      properties:
        $type:
          description: Serialized type of this operation outcome.
          enum:
            - Derivitec.Web.Core.ApiBaseResponse, Derivitec.Web.Core
          type: string
        is_success:
          description: >-
            Whether the operation completed successfully. Check error_messages
            when this is false.
          type: boolean
        error_messages:
          description: >-
            Messages explaining operation-level failures. Empty when there are
            no errors.
          items:
            type: string
          nullable: true
          type: array
      required:
        - $type
      type: object
    StockData:
      example:
        date: '2000-01-23T04:56:07.000+00:00'
        volume: 5.637376656633329
        identifier:
          code: code
          market_identification_code: market_identification_code
          identifier_type: Derivitec
        split_factor: 2.3021358869347655
        high: 6.027456183070403
        low: 1.4658129805029452
        currency: currency
        close: 0.8008281904610115
        open: 5.962133916683182
      properties:
        provider_id:
          nullable: true
          type: string
        close:
          format: double
          type: number
        currency:
          nullable: true
          type: string
        date:
          format: date-time
          type: string
        high:
          format: double
          type: number
        low:
          format: double
          type: number
        open:
          format: double
          type: number
        identifier:
          $ref: '#/components/schemas/InstrumentIdentifier'
        volume:
          format: double
          type: number
        split_factor:
          format: double
          nullable: true
          type: number
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.StockData, Derivitec.Web.Core
      required:
        - $type
      type: object
    InstrumentIdentifier:
      example:
        code: code
        market_identification_code: market_identification_code
        identifier_type: Derivitec
      properties:
        code:
          nullable: true
          type: string
        identifier_type:
          enum:
            - Derivitec
            - Ric
            - Bloomberg
            - Isin
            - Figi
            - Sedol
            - RedCode
            - RedPairCode
            - BloombergYellow
            - XIgniteCode
            - CBondsId
            - EdiSecId
            - EdiSymbol
            - NotSet
          type: string
        market_identification_code:
          nullable: true
          type: string
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.InstrumentIdentifier,
              Derivitec.Web.Core
      required:
        - $type
      type: object
  securitySchemes:
    oauth2:
      description: >-
        OAuth2 access-token requested from AWS Cognito and provided as a Auth
        Bearer header
      flows:
        implicit:
          authorizationUrl: https://auth.riskportal.derivitec.com/oauth2/authorize
          scopes: {}
      type: oauth2
    apikey:
      description: API-Key requested via the site and provided as a header
      in: header
      name: x-api-key
      type: apiKey

````