# Tipo de cambio SBS

La información se actualiza todos los días hábiles entre las 00:00 y 06:00 horas (GMT-5) debido a la disponibilidad variable de las fuentes oficiales.

Puede consultar información del año 2010 en adelante.

### Monedas disponibles

| Moneda             | Código |
| ------------------ | ------ |
| Dólares Americanos | USD    |
| Euro               | EUR    |

## GET /tipo-cambio/sbs

> Consulta tipo de cambio por fecha SBS

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"tipo-cambio"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"TipoCambio":{"type":"object","properties":{"success":{"type":"boolean"},"fecha":{"type":"string"},"moneda":{"type":"string"},"precio_compra":{"type":"string"},"precio_venta":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}}},"paths":{"/tipo-cambio/sbs":{"get":{"summary":"Consulta tipo de cambio por fecha SBS","tags":["tipo-cambio"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"fecha","in":"query","required":true,"schema":{"type":"string"}},{"name":"moneda","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TipoCambio"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

## GET /tipo-cambio/sbs/ultimo

> Consulta último tipo de cambio SBS

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"tipo-cambio"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"TipoCambio":{"type":"object","properties":{"success":{"type":"boolean"},"fecha":{"type":"string"},"moneda":{"type":"string"},"precio_compra":{"type":"string"},"precio_venta":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}}},"paths":{"/tipo-cambio/sbs/ultimo":{"get":{"summary":"Consulta último tipo de cambio SBS","tags":["tipo-cambio"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"moneda","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TipoCambio"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```

## GET /tipo-cambio/sbs/historico

> Consulta tipo de cambio por rango de fecha SBS

```json
{"openapi":"3.0.2","info":{"title":"MIGO API","version":"2.0"},"tags":[{"name":"tipo-cambio"}],"servers":[{"url":"https://api.migo.pe/api/v2"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"AcceptJsonParam":{"name":"Accept","in":"header","required":true,"schema":{"type":"string"}}},"schemas":{"TipoCambioCollection":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TipoCambioCollectionItem"}}}},"TipoCambioCollectionItem":{"type":"object","properties":{"fecha":{"type":"string"},"moneda":{"type":"string"},"precio_compra":{"type":"string"},"precio_venta":{"type":"string"}}},"Forbidden":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"NotFound":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}},"UnprocessableContent":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"errors":{"type":"object"}}}}},"paths":{"/tipo-cambio/sbs/historico":{"get":{"summary":"Consulta tipo de cambio por rango de fecha SBS","tags":["tipo-cambio"],"parameters":[{"$ref":"#/components/parameters/AcceptJsonParam"},{"name":"fecha_inicio","in":"query","required":true,"schema":{"type":"string"}},{"name":"fecha_fin","in":"query","required":true,"schema":{"type":"string"}},{"name":"moneda","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TipoCambioCollection"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnprocessableContent"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.migo.pe/v2/tipo-de-cambio/tipo-de-cambio-sbs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
