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

# Retrieve cryptocurrency observations.

> Use this operation to retrieve dated cryptocurrency observations, such as those for code `BTC`, over
an inclusive range. Results are grouped under the requested coin codes and include only observations that
are available. The request has no provider selector and does not modify market data.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json post /api/MarketData/GetCryptoCoinData
openapi: 3.0.4
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
tags:
  - name: AdminUser
  - name: AtotiReport
  - name: AtotiSession
  - name: BloombergOAuth
  - name: Bond
  - name: BondYieldCurvePage
  - name: BookAccess
  - name: Books
  - name: Commodity
  - name: Counterparties
  - name: Currencies
  - name: Equity
  - name: EquityDividend
  - name: EquityPage
  - name: FeatureFlag
  - name: Fx
  - name: FxPage
  - name: GroupAccess
  - name: Home
  - name: LegacyPosition
  - name: MarketData
  - name: MarketDataProvider
  - name: MarketDataProviderAccess
  - name: Meta
  - name: Notification
  - name: Organisation
  - name: PnLReport
  - name: PortfolioAccess
  - name: Portfolios
  - name: Position
  - name: PositionFilter
  - name: PricingEnvironment
  - name: PricingEnvironmentAccess
  - name: RateAsset
  - name: RateAssetPage
  - name: Report
  - name: ReportDefinition
  - name: ReportHistoryLauncherQuery
  - name: ReportLauncher
  - name: ReportQuery
  - name: ReportQueryViewUser
  - name: ReportRestriction
  - name: ReportView
  - name: RiskReport
  - name: Tradable
  - name: TradeBooking
  - name: User
  - name: VarReport
  - name: VarReportQuery
  - name: YieldCurvePage
paths:
  /api/MarketData/GetCryptoCoinData:
    post:
      tags:
        - MarketData
      summary: Retrieve cryptocurrency observations.
      description: >-
        Use this operation to retrieve dated cryptocurrency observations, such
        as those for code `BTC`, over

        an inclusive range. Results are grouped under the requested coin codes
        and include only observations that

        are available. The request has no provider selector and does not modify
        market data.
      operationId: GetCryptoCoinData
      requestBody:
        description: >-
          The query payload containing non-empty cryptocurrency `Codes` and
          start/end values interpreted as date-only inclusive boundaries.
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/ApiGetCryptoCoinDataRequest'
          application/json:
            schema:
              $ref: '#/components/schemas/ApiGetCryptoCoinDataRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/ApiGetCryptoCoinDataRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/ApiGetCryptoCoinDataRequest'
      responses:
        '200':
          description: Returns available cryptocurrency observations grouped by code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetCryptoCoinDataResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiGetCryptoCoinDataRequest:
      required:
        - $type
      type: object
      properties:
        codes:
          type: array
          items:
            type: string
          description: Asset codes that narrow the crypto coin operation.
          nullable: true
        start_date:
          type: string
          description: Inclusive lower date-only boundary for the requested observations.
          format: date-time
        end_date:
          type: string
          description: Inclusive upper date-only boundary for the requested observations.
          format: date-time
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiGetCryptoCoinDataRequest,
              Derivitec.Web.Core
      additionalProperties: false
      description: Queries dated crypto-asset observations by code and date range.
    ApiGetCryptoCoinDataResponse:
      required:
        - $type
      type: object
      properties:
        is_success:
          type: boolean
          description: >-
            Whether the operation completed successfully. The default is `true`;
            error outcomes set it to `false`.
          example: true
        error_messages:
          type: array
          items:
            type: string
          description: >-
            Messages explaining operation-level failures. The collection is
            empty by default.
          nullable: true
        coin_data:
          type: array
          items:
            $ref: '#/components/schemas/StringCryptoCoinDataIEnumerableKeyValuePair'
          description: Crypto-asset observations returned by the query.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.MarketData.ApiGetCryptoCoinDataResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: Returns dated crypto-asset observations.
    StringCryptoCoinDataIEnumerableKeyValuePair:
      type: object
      properties:
        key:
          type: string
          nullable: true
        value:
          type: array
          items:
            $ref: '#/components/schemas/CryptoCoinData'
          nullable: true
      additionalProperties: false
    CryptoCoinData:
      required:
        - $type
      type: object
      properties:
        provider_id:
          type: string
          description: >-
            Market-data provider code recorded as the source of the
            contribution. Defaults to Derivitec.
          nullable: true
        derivitec_created:
          type: string
          description: Timestamp at which the market-data record was created.
        derivitec_modified:
          type: string
          description: Optional timestamp of the record's latest modification.
          nullable: true
        uploaded_date_time:
          type: string
          description: >-
            Optional timestamp at which the contribution was uploaded.
            UploadRateAssets ignores the supplied value on each rate asset and
            stores the current UTC time.
          nullable: true
        derivitec_modified_by:
          type: string
          description: >-
            Principal recorded as the latest modifier. UploadRateAssets ignores
            the supplied value on each rate asset and stores the authenticated
            user identifier.
          nullable: true
        uploaded_by:
          type: string
          description: >-
            Principal recorded as the uploader. UploadRateAssets ignores the
            supplied value on each rate asset and stores the authenticated user
            identifier.
          nullable: true
        rolled:
          type: boolean
          description: Whether the contribution has been rolled.
          example: false
        volume:
          type: number
          description: Reported trading volume.
          format: double
          nullable: true
        circulating_supply:
          type: number
          description: Circulating supply on the observation date.
          format: double
          nullable: true
        date:
          type: string
          description: Observation date.
          format: date-time
        code:
          type: string
          description: Asset code.
          nullable: true
        $type:
          type: string
          enum:
            - Derivitec.Web.Core.MarketData.CryptoCoinData, Derivitec.Web.Core
      additionalProperties: false
      description: >-
        Dated crypto-asset observation containing code, circulating supply, and
        volume.
  securitySchemes:
    oauth2:
      type: 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: {}
    apikey:
      type: apiKey
      description: API-Key requested via the site and provided as a header
      name: x-api-key
      in: header

````