- GET /cashin-rate#
This public endpoint allows clients to calculate the exchange rate between the regional currency and the fiat currency of the banking system.
This endpoint shows how the bank would apply the cash-in ratio and fee to one input amount. Typically, wallets would request this endpoint before creating withdrawals that involve a currency conversion.
Request:
- Query Parameters:
amount_debit – this is the amount that the user will get deducted from their fiat bank account.
or
- Query Parameters:
amount_credit – this is the amount that the user will receive in their regional bank account.
Response:
- 200 OK:
Response is a CashinConversionResponse.
- 400 Bad request:
TALER_EC_GENERIC_PARAMETER_MISSING: none of the parameters have been provided.TALER_EC_GENERIC_PARAMETER_MALFORMED: both of the parameters have been provided or one of them is not a valid Taler amount.TALER_EC_GENERIC_CURRENCY_MISMATCH: the parameter is in the wrong currency.
- 401 Unauthorized:
Invalid credentials or missing rights.
- 403 Forbidden:
Missing rights.
- 409 Conflict:
The amount is too small to be converted because it produces an amount less than zero.
- 501 Not implemented:
This server does not support conversion, client should check config response.
Details: