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

X-Rates Graph Data

Docs API
https://api.sandbase.ai/v1/api/x-rates/graph-data

Returns exchange rate trend data points for a currency pair for the current year, suitable for generating graphs. Each data point contains a month abbreviation label and that month's average rate value, in calendar order up to the current month. One page fetch per call; no pagination.

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

Bac à sable

Entrée
Target currency code (e.g. EUR).
Source currency code (e.g. USD).
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 Graph Data API

Returns exchange rate trend data points for a currency pair for the current year, suitable for generating graphs. Each data point contains a month abbreviation label and that month's average rate value, in calendar order up to the current month. One page fetch per call; no pagination.

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/graph-data", "to": "JPY", "from": "USD", "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.

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 Graph Data ?

Envoyez une requête POST à https://api.sandbase.ai/v1/api/x-rates/graph-data 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 Graph Data ?

$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 Graph Data accepte-t-elle ?

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

Que renvoie l’API X-Rates Graph Data ?

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 Graph Data 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.