Taxa de Câmbio
GetAutenticação necessária
Devolve uma cotação para conversão entre duas moedas. A cotação inclui a taxa de câmbio e um rate_token — passe ambos para uma transferência entre moedas para executar à taxa cotada.
Endpoint
Get
/wallet/v1/exchange-rateURL Base: https://api.derivws.com
Códigos de Estado
200OK - Quote for the requested currency pair.
400Bad request - errors[0].code will be ValidationError (missing or invalid source_currency or destination_currency).
401Unauthorized - Missing or invalid Bearer token.
403Forbidden - Valid token but insufficient scope (payment scope required).
429Too many requests - Rate limit exceeded.
500Internal server error - For example, no rate is available for the requested pair.
503Service unavailable - Request rejected by the gateway circuit breaker.
504Gateway timeout - The service did not respond in time.
Respostas de Erro
400Validation error
{
"errors": [
{
"status": 400,
"code": "ValidationError",
"message": "source_currency is required",
"field": "source_currency"
}
]
}500No rate available for the requested pair
{
"errors": [
{
"status": 500,
"code": "InternalServerError",
"message": "No exchange rate is available for USD to BTC"
}
]
}Autenticação Necessária
Este endpoint requer um token Bearer. Ao autenticar com um Personal Access Token (PAT), o cabeçalho
Deriv-App-ID é obrigatório para identificar a sua aplicação (Authentication). Âmbito OAuth2: paymentAcerca de Taxa de Câmbio
O endpoint GET /wallet/v1/exchange-rate: Devolve uma cotação para conversão entre duas moedas. A cotação inclui a taxa de câmbio e um rate_token — passe ambos para uma transferência entre moedas para executar à taxa cotada.
Alguma outra questão? Entrar em contacto