tostringrequerido
Target currency code (e.g. USD, JPY). Supports all codes returned by get_currency_symbols.
https://api.sandbase.ai/v1/api/xe/convert-currencyConvert a specific amount from source to target currency. Returns the same structure as get_live_exchange_rate with the specified amount applied to the mid-market rate.
Su salida aparecerá aquí
Complete las entradas y luego haga clic en Ejecutar.
Convert a specific amount from source to target currency. Returns the same structure as get_live_exchange_rate with the specified amount applied to the mid-market rate.
curl -X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "xe/convert-currency", "to": "USD", "from": "EUR", "amount": 100.0}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount to convert |
from | string | Yes | Source currency code (e.g. EUR, GBP). Supports all codes returned by get_currency_symbols. |
to | string | Yes | Target currency code (e.g. USD, JPY). Supports all codes returned by get_currency_symbols. |
Flat $0.03 per call. Failed calls are not charged.
Empiece a construir
Endpoint de la API de la plataforma con autenticación unificada y seguimiento de uso.
curl -X POST "https://api.sandbase.ai/v1/api/xe/convert-currency" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "USD",
"from": "EUR",
"amount": 100
}'Configure su clave de API de SandBase en el entorno de su servidor. Las solicitudes usan autenticación Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserve su clave en el servidor. No la exponga en código del navegador.
tostringrequeridoTarget currency code (e.g. USD, JPY). Supports all codes returned by get_currency_symbols.
fromstringrequeridoSource currency code (e.g. EUR, GBP). Supports all codes returned by get_currency_symbols.
amountnumberrequeridoAmount to convert
Respuesta de ejemplo guardada para esta API; no se realiza ninguna solicitud en vivo al verla.
No se ha publicado ninguna respuesta guardada. Ejecute la API en Playground para inspeccionar su respuesta.
Explorar más
| API | Precio | Respuesta |
|---|---|---|
XE Convert CurrencyEsta API XE | $0.03 por llamada | JSON |
XE | $0.06 por llamada | JSON |
XE | $0.03 por llamada | JSON |
XE | $0.03 por llamada | JSON |
XE | $0.03 por llamada | JSON |
XE | $0.03 por llamada | JSON |
Preguntas
Envía una solicitud POST a https://api.sandbase.ai/v1/api/xe/convert-currency con tu clave API de SandBase en el encabezado Authorization (Bearer) y los parámetros como un cuerpo JSON. También puedes probarlo en el Playground de esta página sin escribir código.
$0.03 por llamada, facturado desde tu saldo de SandBase. Solo se te cobra por las llamadas que haces; no hay suscripción.
Requeridos: to (string), from (string) y amount (number). La tabla de Parámetros y el Playground de esta página enumeran todos los campos.
Una respuesta JSON devuelta en la misma solicitud HTTP (sincrónica).
No. XE Convert Currency funciona a través de SandBase, así que una sola clave API de SandBase cubre este endpoint y todas las demás APIs y modelos del catálogo. No necesitas solicitar acceso a la API de XE por separado.