Commencer
Passons en revue les principaux concepts de l'API en abordant certains cas d'utilisation quotidiens.
Aperçu
La plupart des applications utiliseront une bibliothèque d'encapsuleurs existante dans la langue de votre choix, mais il est important de familiarisez-vous d'abord avec les méthodes HTTP sous-jacentes de l'API. Il n'y a pas de moyen plus simple de donner un coup de pied aux pneus que via cURL . Si vous utilisez un autre client, notez que vous devez envoyer un jeton d'authentification valide dans votre demande.
Les taux
La plateforme la plus fiable pour obtenir les taux de change en direct. Convertissez des devises étrangères instantanément avec la calculatrice Abokifx.
APPELER L'API TARIFS ACTUELS
Copiez et collez la commande suivante à l'invite de commande avec votre jeton:
curl https://abokifx.com/api/v1/rates/movement -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la demande ci-dessus vous donne la réponse suivante:
{
"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"
}
]
}
}
APPELER L'API TARIFS PRÉCÉDENTS
Copiez et collez la commande suivante à l'invite de commande avec votre jeton:
curl https://abokifx.com/api/v1/rates/lagos_previous -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la demande ci-dessus vous donne la réponse suivante:
{
"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"
}
]
}
}
APPELER L'API TARIFS PARALLÈLES
Copiez et collez la commande suivante à l'invite de commande avec votre jeton:
curl https://abokifx.com/api/v1/rates/otherparallel -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la demande ci-dessus vous donne la réponse suivante:
{
"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"
}
]
}
}
APPELER L'API DATES RATES
Copiez et collez la commande suivante à l'invite de commande avec votre jeton:
curl https://abokifx.com/api/v1/rates/date?date=24-04-2020 -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la demande ci-dessus vous donne la réponse suivante:
{
"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"
}
]
}
APPELER L'API DES TARIFS DE DATE AVEC LE PARAMÈTRE DE DEVISE
Copiez et collez la commande suivante à l'invite de commande avec votre jeton:
curl https://abokifx.com/api/v1/rates/date?date=24-03-2020¤cy=EUR -H "Accept: application/json" "Authorization: Bearer {YOUR_AUTH_TOKEN}"
la demande ci-dessus vous donne la réponse suivante:
{
"response": [
{
"id": 64,
"currency_name": "EUR",
"currency_rate": "42 / 50"
}
]
}