Astranexo Tipo de cambio API

Tipo de cambio de referencia, histórico y por entidad financiera.

Operations 4

GET /exchange-rates Tipo de cambio actual USD/CRC #
GET /exchange-rates/historical Tipo de cambio histórico #
GET /exchange-rates/pair Tipo de cambio de un par de monedas #
GET /exchange-rates/entities Tipo de cambio por entidad financiera #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/astranexo-com:astranexo-com-tipo-de-cambio-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

astranexo-com-tipo-de-cambio-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Astranexo Com Tipo de cambio API
  version: '1.0'
  contact:
    name: Soporte de Aster
    url: https://astranexo.com/soporte
    email: app@astranexo.com
  description: 'Operations tagged Tipo de cambio across 2 of this provider''s published API definitions: aster-openapi.yaml, fe-api-openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://aster.astranexo.com/api/v1
  description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
security:
- ApiKey: []
tags:
- name: Tipo de cambio
  description: Tipo de cambio de referencia, histórico y por entidad financiera.
paths:
  /exchange-rates:
    get:
      operationId: getExchangeRate
      tags:
      - Tipo de cambio
      summary: Tipo de cambio actual USD/CRC
      description: Tipo de cambio de referencia vigente (compra y venta). Si ninguna fuente responde, `buy`/`sell` son `0` y `note` explica el motivo (HTTP 200).
      x-required-ability: reference:read
      responses:
        '200':
          description: Tipo de cambio.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/ExchangeRate'
              example:
                success: true
                data:
                  buy: 505.12
                  sell: 511.43
                  date: '2026-10-08'
                  source: hacienda
                  entity: BCCR
                timestamp: '2026-10-08T16:00:00Z'
                api_version: '1.0'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
  /exchange-rates/historical:
    get:
      operationId: getHistoricalExchangeRate
      tags:
      - Tipo de cambio
      summary: Tipo de cambio histórico
      description: Tipo de cambio USD/CRC del BCCR para una fecha pasada. Fines de semana y feriados toman el del día hábil anterior. Si no se puede resolver, `buy`/`sell` son `0` con `note`.
      x-required-ability: reference:read
      parameters:
      - name: date
        in: query
        required: true
        description: Fecha (`YYYY-MM-DD`), no futura.
        schema:
          type: string
          format: date
      responses:
        '200':
          description: Tipo de cambio de la fecha.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/ExchangeRate'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
  /exchange-rates/pair:
    get:
      operationId: getExchangeRatePair
      tags:
      - Tipo de cambio
      summary: Tipo de cambio de un par de monedas
      description: 'Tipo de cambio entre dos monedas ISO 4217. Con `entity` (solo USD/CRC) devuelve el

        tipo de ventanilla de esa entidad financiera; si no está disponible responde con la

        cadena de referencia y `fallback: true`. `stale: true` indica que se usó el último

        valor guardado porque la fuente en vivo no respondió.'
      x-required-ability: reference:read
      parameters:
      - name: from
        in: query
        required: true
        description: Moneda de origen (ISO 4217).
        schema:
          type: string
          minLength: 3
          maxLength: 3
          example: USD
      - name: to
        in: query
        required: true
        description: Moneda de destino (ISO 4217).
        schema:
          type: string
          minLength: 3
          maxLength: 3
          example: CRC
      - name: entity
        in: query
        description: Nombre de la entidad, tal como lo devuelve `GET /exchange-rates/entities`.
        schema:
          type: string
      responses:
        '200':
          description: Tipo de cambio del par.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      $ref: '#/components/schemas/ExchangeRatePair'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
  /exchange-rates/entities:
    get:
      operationId: listExchangeRateEntities
      tags:
      - Tipo de cambio
      summary: Tipo de cambio por entidad financiera
      description: Tipo de cambio USD/CRC de ventanilla de cada entidad autorizada. Guarde `entity` tal cual para usarlo en `GET /exchange-rates/pair`. Lista vacía si el servicio no está disponible.
      x-required-ability: reference:read
      responses:
        '200':
          description: Entidades.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/ExchangeRateEntity'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    servers:
    - url: https://aster.astranexo.com/api/v1
      description: Producción. La misma URL atiende claves de prueba y de producción; la clave decide el ambiente de Hacienda.
components:
  headers:
    X-RateLimit-Remaining:
      description: Solicitudes restantes en la ventana actual.
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Fin de la ventana actual (segundos Unix).
      schema:
        type: integer
        format: int64
    Retry-After:
      description: Segundos que faltan para poder reintentar.
      schema:
        type: integer
    X-RateLimit-Limit:
      description: Solicitudes permitidas en la ventana actual.
      schema:
        type: integer
  schemas:
    ExchangeRate:
      type: object
      properties:
        buy:
          type: number
        sell:
          type: number
        date:
          type: string
          format: date
        source:
          type: string
          description: Origen del tipo de cambio — `hacienda` o `bccr` (referencia), `ventanilla` (tasa de una entidad autorizada), `mercado` (otras monedas) o `unavailable`.
        entity:
          type: string
        note:
          type: string
          description: Motivo cuando el tipo de cambio no está disponible.
    ExchangeRateEntity:
      type: object
      properties:
        entity:
          type: string
          example: Banco BAC San José S.A.
        buy:
          type: number
        sell:
          type: number
        date:
          type: string
          format: date
        provider:
          type: string
    ErrorPayload:
      type: object
      required:
      - code
      - message
      properties:
        code:
          type: string
          description: Código estable del error, para usar en el código del cliente.
          example: validation_error
        message:
          type: string
          description: Descripción legible.
        errors:
          type: object
          description: Mensajes por campo (ruta con puntos, por ejemplo `items.0.cabys_code`).
          additionalProperties:
            type: array
            items:
              type: string
    Envelope:
      type: object
      description: Envoltura de las respuestas exitosas.
      required:
      - success
      - timestamp
      - api_version
      properties:
        success:
          type: boolean
          const: true
        message:
          type: string
          description: Mensaje legible (en inglés) de algunas operaciones.
        data:
          description: Contenido de la respuesta.
        timestamp:
          type: string
          format: date-time
        api_version:
          type: string
          example: '1.0'
    ErrorEnvelope:
      type: object
      description: Envoltura de los errores.
      required:
      - success
      - error
      - timestamp
      - api_version
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
          description: Repite `error.message` en los errores de autenticación, permisos, límites, idempotencia y cuota.
        error:
          $ref: '#/components/schemas/ErrorPayload'
        timestamp:
          type: string
          format: date-time
        api_version:
          type: string
          example: '1.0'
    ExchangeRatePair:
      type: object
      properties:
        from:
          type: string
        to:
          type: string
        buy:
          type: number
        sell:
          type: number
        rate:
          type: number
          description: Igual a `sell`.
        date:
          type: string
          format: date
        source:
          type: string
        entity:
          type: string
        fallback:
          type: boolean
          description: Se pidió una entidad que no estaba disponible y respondió la cadena de referencia.
        stale:
          type: boolean
          description: Se usó el último valor guardado.
        note:
          type: string
  responses:
    Forbidden:
      description: 'Sin permiso: `forbidden` (falta la habilidad), `organization_key_required`, `live_key_required`, `no_tenant`, `tenant_inactive`, `tenant_deleted`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            message: This action is unauthorized.
            error:
              code: forbidden
              message: This action is unauthorized.
            timestamp: '2026-10-08T16:00:00Z'
            api_version: '1.0'
    TooManyRequests:
      description: Límite de solicitudes alcanzado (`rate_limited`).
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            message: Rate limit exceeded. Try again in 12 seconds.
            error:
              code: rate_limited
              message: Rate limit exceeded. Try again in 12 seconds.
            timestamp: '2026-10-08T16:00:00Z'
            api_version: '1.0'
    Unauthorized:
      description: 'Clave ausente, desconocida, vencida o revocada: `unauthenticated`, `token_expired`, `key_revoked`, `tenant_unresolved`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            message: Unauthenticated.
            error:
              code: unauthenticated
              message: Unauthenticated.
            timestamp: '2026-10-08T16:00:00Z'
            api_version: '1.0'
    BadRequest:
      description: 'Solicitud mal formada: `invalid_json`, `invalid_request`, `invalid_idempotency_key`, `invalid_body`, `missing_params`, `missing_date`, `invalid_date`, `future_date`, `invalid_currency`, `missing_category`, `missing_param`, `too_many_codes`, etc.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          example:
            success: false
            error:
              code: invalid_json
              message: 'Invalid JSON in request body: unexpected EOF'
            timestamp: '2026-10-08T16:00:00Z'
            api_version: '1.0'
    ServiceUnavailable:
      description: 'Servicio no disponible temporalmente: `billing_unavailable`, `service_unavailable`, `auth_unavailable`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: 'Tu llave de API en el encabezado `Authorization: Bearer <llave>`: `aster_test_…` (pruebas) o `aster_live_…` (producción).'
x-refined-from:
- aster-openapi.yaml
- fe-api-openapi.yaml