Empezando
Veamos los conceptos básicos de la API a medida que abordamos algunos casos de uso cotidiano.
Visión general
La mayoría de las aplicaciones utilizarán una biblioteca contenedor existente en el idioma que elija, pero es importante familiarícese primero con los métodos HTTP API subyacentes. No hay forma más fácil de patear los neumáticos que a través de cURL . Si está utilizando un cliente alternativo, tenga en cuenta que debe enviar un token de autenticación válido en su solicitud.
Tarifas
La plataforma más confiable para obtener los tipos de cambio en vivo. Convierta monedas extranjeras al instante con la calculadora Abokifx.
LLAME AL API DE TARIFAS ACTUALES
Copie y pegue el siguiente comando en el símbolo del sistema con su token:
curl https://abokifx.com/api/v1/rates/movement -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la solicitud anterior le da la siguiente respuesta:
{
"response": {
"2020-05-22 08:01:46": [
{
"id": 237,
"currency_name": "EUR",
"currency_rate": "2 / 2*",
"currency_type": "LogosParallel",
"currency_flag": "EUR",
"created_at": "2020-05-22T08:01:46.000Z",
"updated_at": "2020-04-30T08:01:46.000Z"
},
{
"id": 236,
"currency_name": "GBP",
"currency_rate": "3 / 3***",
"currency_type": "LogosParallel",
"currency_flag": "GBP",
"created_at": "2020-05-22T08:01:46.000Z",
"updated_at": "2020-04-30T08:01:46.000Z"
}
]
}
}
LLAME A LA API DE TARIFAS ANTERIORES
Copie y pegue el siguiente comando en el símbolo del sistema con su token:
curl https://abokifx.com/api/v1/rates/lagos_previous -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la solicitud anterior le da la siguiente respuesta:
{
"response": {
"2020-05-22 08:01:46": [
{
"id": 237,
"currency_name": "EUR",
"currency_rate": "2 / 2*",
"currency_type": "LogosParallel",
"currency_flag": "EUR",
"created_at": "2020-05-22T08:01:46.000Z",
"updated_at": "2020-04-30T08:01:46.000Z"
},
{
"id": 236,
"currency_name": "GBP",
"currency_rate": "3 / 3***",
"currency_type": "LogosParallel",
"currency_flag": "GBP",
"created_at": "2020-05-22T08:01:46.000Z",
"updated_at": "2020-04-30T08:01:46.000Z"
}
]
}
}
LLAME A LA API DE TARIFAS PARALELAS
Copie y pegue el siguiente comando en el símbolo del sistema con su token:
curl https://abokifx.com/api/v1/rates/otherparallel -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la solicitud anterior le da la siguiente respuesta:
{
"response": {
"2020-05-22 08:01:46": [
{
"id": 237,
"currency_name": "EUR",
"currency_rate": "2 / 2*",
"currency_type": "LogosParallel",
"currency_flag": "EUR",
"created_at": "2020-05-22T08:01:46.000Z",
"updated_at": "2020-04-30T08:01:46.000Z"
},
{
"id": 236,
"currency_name": "GBP",
"currency_rate": "3 / 3***",
"currency_type": "LogosParallel",
"currency_flag": "GBP",
"created_at": "2020-05-22T08:01:46.000Z",
"updated_at": "2020-04-30T08:01:46.000Z"
}
]
}
}
LLAME AL API DE TARIFAS DE FECHA
Copie y pegue el siguiente comando en el símbolo del sistema con su token:
curl https://abokifx.com/api/v1/rates/date?date=24-04-2020 -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la solicitud anterior le da la siguiente respuesta:
{
"response": [
{
"id": 62,
"currency_name": "USD",
"currency_rate": "10 / 15"
},
{
"id": 63,
"currency_name": "GBP",
"currency_rate": "11 / 15"
},
{
"id": 64,
"currency_name": "EUR",
"currency_rate": "42 / 50"
}
]
}
LLAME AL API DE TARIFAS DE FECHA CON EL PARÁMETRO DE MONEDA
Copie y pegue el siguiente comando en el símbolo del sistema con su token:
curl https://abokifx.com/api/v1/rates/date?date=24-03-2020¤cy=EUR -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la solicitud anterior le da la siguiente respuesta:
{
"response": [
{
"id": 64,
"currency_name": "EUR",
"currency_rate": "42 / 50"
}
]
}