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

# Comparar FCI (series)

> Series de retorno acumulado de hasta 10 fondos alineadas a la primera fecha común, con overlays opcionales de benchmarks. Devuelve 400 si algún fondo no tiene datos en el rango.

<Note>
  Series de retorno acumulado para hasta 10 fondos, alineadas a la primera fecha común, con benchmarks opcionales superpuestos. Las series de fondos comparten un calendario común; los benchmarks conservan sus propios días de negociación. Requiere el scope `fci:read`.
</Note>

## Parámetros de consulta

<ParamField query="fund_names" type="string[]" required>
  Nombres exactos de los fondos a comparar. Se repite el parámetro por cada fondo (`?fund_names=A&fund_names=B`). Máximo 10 fondos.
</ParamField>

<ParamField query="benchmarks" type="string[]">
  Benchmarks a superponer. Se repite el parámetro por cada benchmark. Los benchmarks disponibles se obtienen con `GET /api/v1/fci/benchmarks`.
</ParamField>

<ParamField query="interval" type="string">
  Intervalo de fechas, mutuamente excluyente con `date_from`/`date_to`. Ejemplos: `1 week`, `1 month`, `3 months`, `ytd`, `1 year`, `max` (también acepta los alias cortos `1W`, `1M`, `3M`, `YTD`, `1Y`).
</ParamField>

<ParamField query="date_from" type="string">
  Inicio del rango en formato YYYY-MM-DD. Mutuamente excluyente con `interval`.
</ParamField>

<ParamField query="date_to" type="string">
  Fin del rango en formato YYYY-MM-DD. Mutuamente excluyente con `interval`.
</ParamField>

<ParamField query="target_currency" type="string">
  Moneda de salida para los fondos: `ARS` o `USD` (predeterminado `ARS`).
</ParamField>

<ParamField query="fx_kind" type="string">
  Tipo de cambio usado para la conversión de moneda (predeterminado `mep`).
</ParamField>

<Info>
  Valores válidos para <code>fx\_kind</code>:

  * <code>mep</code>
  * <code>ccl</code>
  * <code>a3500</code>
  * <code>oficial\_minorista</code>
</Info>

<Note>
  El endpoint devuelve 400 si alguno de los fondos solicitados no tiene datos en el rango.
</Note>

## Ejemplo de Solicitud

<RequestExample>
  ```bash cURL theme={null}
  curl -G "https://api.doctacapital.com.ar/api/v1/fci/compare/series" \
    -H "Authorization: Bearer $DOCTA_TOKEN" \
    --data-urlencode "fund_names=Premier Abierto Pymes - Clase A" \
    --data-urlencode "fund_names=Mercado Fondo - Clase A" \
    --data-urlencode "benchmarks=CER" \
    --data-urlencode "interval=1 week"
  ```
</RequestExample>

## Respuesta Exitosa

<ResponseField name="requested_range" type="object">
  Rango solicitado, con `from` y `to` en formato YYYY-MM-DD (null si se usó `interval` sin fechas explícitas).
</ResponseField>

<ResponseField name="effective_range" type="object">
  Rango efectivo con datos disponibles, con `from` y `to` en formato YYYY-MM-DD.
</ResponseField>

<ResponseField name="target_currency" type="string">
  Moneda de salida aplicada a los fondos.
</ResponseField>

<ResponseField name="fx_kind" type="string">
  Tipo de cambio aplicado.
</ResponseField>

<ResponseField name="fund_count" type="integer">
  Cantidad de fondos incluidos.
</ResponseField>

<ResponseField name="benchmark_count" type="integer">
  Cantidad de benchmarks incluidos.
</ResponseField>

<ResponseField name="funds" type="array">
  Una serie por fondo.
</ResponseField>

<ResponseField name="funds[].fund_name" type="string">
  Nombre del fondo.
</ResponseField>

<ResponseField name="funds[].native_currency" type="string">
  Moneda nativa del fondo.
</ResponseField>

<ResponseField name="funds[].series" type="array">
  Puntos de la serie: `date` (YYYY-MM-DD) y `cumulative_return` (retorno acumulado como decimal, 0.0 en la fecha ancla).
</ResponseField>

<ResponseField name="benchmarks" type="array">
  Una serie por benchmark, con `name`, `type` y sus propios puntos `date`/`cumulative_return`.
</ResponseField>

<ResponseField name="data_quality" type="object">
  Metadatos de calidad: `common_dates_count` (fechas comunes entre fondos) y `anchor_date` (fecha ancla de la alineación).
</ResponseField>

## Ejemplo de Respuesta Exitosa

<ResponseExample>
  ```json Success theme={null}
  {
    "requested_range": {
      "from": null,
      "to": null
    },
    "effective_range": {
      "from": "2026-07-23",
      "to": "2026-07-30"
    },
    "target_currency": "ARS",
    "fx_kind": "mep",
    "fund_count": 2,
    "benchmark_count": 1,
    "funds": [
      {
        "fund_name": "Premier Abierto Pymes - Clase A",
        "native_currency": "ARS",
        "series": [
          {
            "date": "2026-07-23",
            "cumulative_return": 0.0
          },
          {
            "date": "2026-07-24",
            "cumulative_return": 0.001611773016768625
          },
          {
            "date": "2026-07-27",
            "cumulative_return": 0.008401386594302673
          }
        ]
      },
      {
        "fund_name": "Mercado Fondo - Clase A",
        "native_currency": "ARS",
        "series": [
          {
            "date": "2026-07-23",
            "cumulative_return": 0.0
          },
          {
            "date": "2026-07-24",
            "cumulative_return": 0.0004792094833239169
          },
          {
            "date": "2026-07-27",
            "cumulative_return": 0.0019162360121554034
          }
        ]
      }
    ],
    "benchmarks": [
      {
        "name": "CER",
        "type": "quote",
        "series": [
          {
            "date": "2026-07-27",
            "cumulative_return": 0.0
          },
          {
            "date": "2026-07-28",
            "cumulative_return": 0.0006073377175133121
          },
          {
            "date": "2026-07-29",
            "cumulative_return": 0.0012150442941305517
          }
        ]
      }
    ],
    "data_quality": {
      "common_dates_count": 6,
      "anchor_date": "2026-07-23"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /api/v1/fci/compare/series
openapi: 3.1.0
info:
  title: API de Docta
  description: >-
    API de mercado argentino: bonos (instrumentos, cashflows, curvas/yields) y
    FCI (screener, series, performance, comparaciones y analytics de industria).
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.doctacapital.com.ar
security: []
paths:
  /api/v1/fci/compare/series:
    get:
      tags:
        - FCI
      description: >-
        Series de retorno acumulado de hasta 10 fondos alineadas a la primera
        fecha común, con overlays opcionales de benchmarks. Devuelve 400 si
        algún fondo no tiene datos en el rango.
      parameters:
        - name: fund_names
          in: query
          required: true
          schema:
            type: array
            items:
              type: string
            minItems: 1
            maxItems: 10
            description: 'Fund names (repeat the param: ?fund_names=A&fund_names=B)'
        - name: benchmarks
          in: query
          required: false
          schema:
            type: array
            items:
              type: string
            description: Benchmark names to overlay (repeat the param)
        - name: interval
          in: query
          required: false
          schema:
            type: string
            description: >-
              Date interval, mutually exclusive with date_from/date_to.
              Examples: '1 week', '1 month', '3 months', 'ytd', '1 year', 'max'
              (short aliases 1W, 1M, 3M, YTD, 1Y accepted).
        - name: date_from
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: Range start YYYY-MM-DD
        - name: date_to
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            description: Range end YYYY-MM-DD
        - name: target_currency
          in: query
          required: false
          schema:
            enum:
              - ARS
              - USD
            type: string
            description: Output currency for funds
            default: ARS
        - name: fx_kind
          in: query
          required: false
          schema:
            enum:
              - mep
              - ccl
              - a3500
              - oficial_minorista
            type: string
            description: FX rate used for currency conversion
            default: mep
      responses:
        '200':
          description: Series comparativas
          content:
            application/json:
              schema:
                type: object
              example:
                requested_range:
                  from: null
                  to: null
                effective_range:
                  from: '2026-07-23'
                  to: '2026-07-30'
                target_currency: ARS
                fx_kind: mep
                fund_count: 2
                benchmark_count: 1
                funds:
                  - fund_name: Premier Abierto Pymes - Clase A
                    native_currency: ARS
                    series:
                      - date: '2026-07-23'
                        cumulative_return: 0
                      - date: '2026-07-24'
                        cumulative_return: 0.001611773016768625
                      - date: '2026-07-27'
                        cumulative_return: 0.008401386594302673
                  - fund_name: Mercado Fondo - Clase A
                    native_currency: ARS
                    series:
                      - date: '2026-07-23'
                        cumulative_return: 0
                      - date: '2026-07-24'
                        cumulative_return: 0.0004792094833239169
                      - date: '2026-07-27'
                        cumulative_return: 0.0019162360121554034
                benchmarks:
                  - name: CER
                    type: quote
                    series:
                      - date: '2026-07-27'
                        cumulative_return: 0
                      - date: '2026-07-28'
                        cumulative_return: 0.0006073377175133121
                      - date: '2026-07-29'
                        cumulative_return: 0.0012150442941305517
                data_quality:
                  common_dates_count: 6
                  anchor_date: '2026-07-23'
        '401':
          description: Autenticación requerida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'Permisos insuficientes: requiere el scope fci:read'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Parámetros inválidos
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      required:
        - type
        - title
        - status
        - detail
        - correlation_id
      type: object
      properties:
        type:
          description: El identificador del tipo de error
          type: string
          example: /errors/authentication-required
        title:
          description: Una breve descripción del error
          type: string
          example: Invalid client credentials
        status:
          description: El código de estado HTTP
          type: integer
          example: 401
        detail:
          description: Una descripción detallada del error
          type: string
          example: Invalid client credentials
        correlation_id:
          description: Un identificador único para rastrear esta solicitud de error
          type: string
          format: uuid
          example: 2eb07802-94de-468a-b70f-75a49f3e9516
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````