Exchange Rate
GetAuth requiredBeta
Returns a quote for converting between two currencies. The quote carries the exchange rate and a rate_token - pass both to a cross-currency transfer to execute at the quoted rate.
Endpoint
Get
/wallet/v1/exchange-rateBase URL: https://api.derivws.com
Status Codes
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.
Error Responses
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"
}
]
}Authentication Required
This endpoint requires the
Deriv-App-ID header to identify your application. OAuth2 Scope: paymentAbout Exchange Rate
The GET /wallet/v1/exchange-rate endpoint: Returns a quote for converting between two currencies. The quote carries the exchange rate and a rate_token - pass both to a cross-currency transfer to execute at the quoted rate.
Any other questions? Get in touch