tostringobrigatório
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.
Sua saída aparecerá aqui
Preencha as entradas e clique em Executar.
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.
Comece a construir
Endpoint da API da plataforma com autenticação unificada e rastreamento 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
}'Defina sua chave da API SandBase no ambiente do seu servidor. As requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha sua chave no servidor. Não a exponha em código do navegador.
tostringobrigatórioTarget currency code (e.g. USD, JPY). Supports all codes returned by get_currency_symbols.
fromstringobrigatórioSource currency code (e.g. EUR, GBP). Supports all codes returned by get_currency_symbols.
amountnumberobrigatórioAmount to convert
Resposta de exemplo salva para esta API; nenhuma requisição ao vivo é feita ao visualizá-la.
Nenhuma resposta salva foi publicada. Execute a API no Playground para inspecionar a resposta.
Explorar mais
| API | Preço | Resposta |
|---|---|---|
XE Convert CurrencyEsta API XE | $0.03 por chamada | JSON |
XE | $0.06 por chamada | JSON |
XE | $0.03 por chamada | JSON |
XE | $0.03 por chamada | JSON |
XE | $0.03 por chamada | JSON |
XE | $0.03 por chamada | JSON |
Perguntas
Envie uma solicitação POST para https://api.sandbase.ai/v1/api/xe/convert-currency com sua chave de API da SandBase no cabeçalho Authorization (Bearer) e os parâmetros no corpo JSON. Você também pode testar no Playground desta página sem escrever código.
$0.03 por chamada, cobrado do seu saldo SandBase. Você paga apenas pelas chamadas que fizer; não há assinatura.
Obrigatórios: to (string), from (string) e amount (number). A tabela de Parâmetros e o Playground nesta página listam todos os campos.
Uma resposta JSON retornada na mesma solicitação HTTP (síncrona).
Não. XE Convert Currency funciona via SandBase, então uma única chave de API da SandBase cobre este endpoint e todas as outras APIs e modelos do catálogo. Você não precisa solicitar acesso à API do XE separadamente.