Ir al contenido
UnoPagoDocumentación
Referencia de la APIAccountExchange rates

Get the exchange rate a payment on a given day converts at

GET
/v1/exchange-rates

Returns the rate a payment dated date converts at. The date in the response is the publication that rate comes from, which can differ from the day requested: a weekend resolves to the following Monday's publication, and a day with no publication to the latest one before it.

Autorización

bearerAuth
headerAutorizaciónBearer <token>

Your API key, created in Configuración → Claves API. The key alone, without the Bearer prefix, is accepted too.

currency*string

Currency to price in bolívares.

Valor en"USD""EUR"
date*string

Day of the payment (YYYY-MM-DD).

Patrón^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Formatodate

Cuerpo de la respuesta

Successful response

application/json
  1. response
currency*string
Valor en"USD""USDT""EUR"
date*string

YYYY-MM-DD. date is the day the rate applies to, and which side of today it falls on depends on the currency. USD and EUR come from the BCV at its Fecha Valor, which is published ahead of the day itself — so the newest row can be dated in the future, and is the rate that will apply then. USDT is an average of the previous day's Binance P2P quotes, published the morning after — so the newest row is dated in the past, normally yesterday.

Patrón^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Formatodate
rate*number

Bs. (VES) per 1 unit of currency.

Ejemplo de solicitud
curl -X GET 'https://api.unopago.com/v1/exchange-rates?currency=USD&date=2019-08-24'
Ejemplo de respuesta
{  "currency": "USD",  "date": "2019-08-24",  "rate": 0}