{
  "openapi": "3.0.0",
  "info": {
    "title": "DolarApi.com",
    "version": "1.1.0",
    "description": "<div class=\"flex flex-col\">\n\n  API desarrollada en <a href=\"https://es.js.org?ref=dolarapi.com\" target=\"_blank\">EsJS</a> que brinda información actualizada sobre las cotizaciones del Dólar en Chile.\n\n  ¿Encontraste útil esta API? <strong>¡Dejá tu ⭐ en <a href=\"https://github.com/enzonotario/esjs-dolar-api\" alt=\"GitHub\" target=\"_blank\">GitHub</a>!</strong>\n\n## Demo\n[App.DolarApi.com](https://app.dolarapi.com)"
  },
  "servers": [
    {
      "url": "https://cl.dolarapi.com",
      "description": "Producción"
    },
    {
      "url": "http://localhost:5173",
      "description": "Local"
    }
  ],
  "paths": {
    "/v1/cotizaciones": {
      "get": {
        "summary": "Cotizaciones",
        "tags": [
          "Cotización actual"
        ],
        "description": "Cotizaciones de las principales monedas en pesos chilenos",
        "responses": {
          "200": {
            "description": "Devuelve las cotizaciones",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Cotizacion"
                  }
                }
              }
            }
          }
        },
        "operationId": "get-cotizaciones",
        "x-data-source": [
          "[Investing.com](https://es.investing.com/)"
        ]
      }
    },
    "/v1/cotizaciones/usd": {
      "get": {
        "summary": "Dólar",
        "tags": [
          "Cotización actual"
        ],
        "description": "Cotización del dólar estadounidense en pesos chilenos",
        "responses": {
          "200": {
            "description": "Devuelve la cotización del Dólar",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Cotizacion"
                  }
                }
              }
            }
          }
        },
        "operationId": "get-usd-clp",
        "x-data-source": [
          "[Investing.com](https://es.investing.com/)"
        ]
      }
    },
    "/v1/cotizaciones/eur": {
      "get": {
        "summary": "Euro",
        "tags": [
          "Cotización actual"
        ],
        "description": "Cotización del euro en pesos chilenos",
        "responses": {
          "200": {
            "description": "Devuelve la cotización del Euro",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cotizacion"
                }
              }
            },
            "headers": {}
          }
        },
        "operationId": "get-eur-clp",
        "x-data-source": [
          "[Investing.com](https://es.investing.com/)"
        ]
      }
    },
    "/v1/cotizaciones/brl": {
      "get": {
        "summary": "Real Brasileño",
        "tags": [
          "Cotización actual"
        ],
        "description": "Cotización del real brasileño en pesos chilenos",
        "responses": {
          "200": {
            "description": "Devuelve la cotización del Real Brasileño",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cotizacion"
                }
              }
            },
            "headers": {}
          }
        },
        "operationId": "get-brl-clp",
        "x-data-source": [
          "[Investing.com](https://es.investing.com/)"
        ]
      }
    },
    "/v1/cotizaciones/ars": {
      "get": {
        "summary": "Peso Argentino",
        "tags": [
          "Cotización actual"
        ],
        "description": "Cotización del peso argentino en pesos chilenos",
        "responses": {
          "200": {
            "description": "Devuelve la cotización del Peso Chileno",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cotizacion"
                }
              }
            },
            "headers": {}
          }
        },
        "operationId": "get-ars-clp",
        "x-data-source": [
          "[Investing.com](https://es.investing.com/)"
        ]
      }
    },
    "/v1/cotizaciones/uyu": {
      "get": {
        "summary": "Peso Uruguayo",
        "tags": [
          "Cotización actual"
        ],
        "description": "Cotización del peso uruguayo en pesos chilenos",
        "responses": {
          "200": {
            "description": "Devuelve la cotización del Peso Uruguayo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Cotizacion"
                }
              }
            },
            "headers": {}
          }
        },
        "operationId": "get-uyu-clp",
        "x-data-source": [
          "[Investing.com](https://es.investing.com/)"
        ]
      }
    },
    "/v1/estado": {
      "get": {
        "summary": "Estado de la API",
        "tags": [
          "API"
        ],
        "responses": {
          "200": {
            "description": "Devuelve el estado de la API",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Estado"
                }
              }
            }
          }
        },
        "operationId": "get-estado"
      }
    }
  },
  "components": {
    "schemas": {
      "Cotizacion": {
        "title": "Cotizacion",
        "type": "object",
        "x-stoplight": {
          "id": "ce96aa7960850"
        },
        "x-examples": {
          "Example 1": {
            "fechaActualizacion": "2021-01-01T00:00:00.000Z",
            "compra": 123.99,
            "venta": 132.99
          }
        },
        "properties": {
          "compra": {
            "type": "number"
          },
          "venta": {
            "type": "number"
          },
          "ultimoCierre": {
            "type": "number"
          },
          "nombre": {
            "type": "string"
          },
          "moneda": {
            "type": "string"
          },
          "fechaActualizacion": {
            "type": "string"
          }
        },
        "required": [
          "venta",
          "ultimoCierre",
          "nombre",
          "moneda",
          "fechaActualizacion"
        ]
      },
      "Estado": {
        "title": "Estado",
        "x-stoplight": {
          "id": "ogwpb2wxiqwqh"
        },
        "type": "object",
        "properties": {
          "estado": {
            "type": "string"
          },
          "aleatorio": {
            "type": "integer"
          }
        },
        "x-examples": {
          "Example 1": {
            "estado": "Disponible",
            "aleatorio": 1234
          }
        }
      }
    }
  }
}
