Sand AISand AI MAGI-2MAGI-2 est maintenant sur SandBase : vidéo 1080p avec audio natifEssayer maintenant

X-Rates Monthly Average

Docs API
https://api.sandbase.ai/v1/api/x-rates/monthly-average

Retrieves monthly average exchange rates for a specific currency pair for a given year. Returns up to 12 monthly data points with the average rate and number of days in each month. Defaults to the current year if year is not specified.

Prix
$0.03USD / appel
Méthode
POST
Réponse
JSON
Paramètres
2 obligatoires · 2 facultatifs

Bac à sable

Entrée
Target currency code (e.g. EUR).
Source currency code (e.g. USD).
Year in YYYY format. Defaults to the current year.
Amount to calculate rates for.
SortiePrêt

Votre sortie apparaîtra ici

Complétez les entrées, puis cliquez sur Exécuter.

README de l'API

X-Rates Monthly Average API

Retrieves monthly average exchange rates for a specific currency pair for a given year. Returns up to 12 monthly data points with the average rate and number of days in each month. Defaults to the current year if year is not specified.

Request

curl -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "x-rates/monthly-average", "to": "JPY", "from": "USD", "year": "2024", "amount": 1.0}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
fromstringYesSource currency code (e.g. USD). One of: USD, EUR, GBP, JPY, CHF, CAD, AUD.
tostringYesTarget currency code (e.g. EUR).
amountnumberNoAmount to calculate rates for.
yearstringNoYear in YYYY format. Defaults to the current year.

Pricing

Flat $0.03 per call. Failed calls are not charged.

Explorer plus

APIs associées

Toutes les APIs
APIPrixRéponse
X-Rates$0.03 par appelJSON
X-Rates$0.03 par appelJSON
X-Rates$0.03 par appelJSON
X-Rates$0.03 par appelJSON
X-Rates$0.03 par appelJSON
X-Rates$0.03 par appelJSON

Questions

FAQ

Comment utiliser l’API X-Rates Monthly Average ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/x-rates/monthly-average avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.

Combien coûte l’API X-Rates Monthly Average ?

$0.03 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.

Quels paramètres l’API X-Rates Monthly Average accepte-t-elle ?

Obligatoire : to (string) et from (l’un de USD, EUR, GBP, JPY, CHF, CAD, AUD). Facultatif : year (string) et amount (number). Le tableau des paramètres et le Playground sur cette page listent tous les champs.

Que renvoie l’API X-Rates Monthly Average ?

Une réponse JSON renvoyée dans la même requête HTTP (synchrone).

Ai-je besoin d’un compte développeur ou d’une clé API X-Rates ?

Non. X-Rates Monthly Average fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API X-Rates séparément.