taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 0d00da41443c2f6be1bf473858a643042cc912c3
parent 595f538463bb43c1299d1d9151267cf16ec9b4ac
Author: Antoine A <>
Date:   Fri, 24 Nov 2023 15:21:44 +0000

Fix conversion info API

Diffstat:
Mcore/api-bank-conversion-info.rst | 36++++++++++++++++++++----------------
Mcore/api-corebank.rst | 2+-
2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/core/api-bank-conversion-info.rst b/core/api-bank-conversion-info.rst @@ -35,14 +35,15 @@ is used by wallets for withdrawals that involve a currency conversion. **Response:** :http:statuscode:`200 OK`: - The exchange responds with a `IntegrationConfig` object. This request should - virtually always be successful. + Response is a `ConversionConfig`. + :http:statuscode:`501 Not implemented`: + This server does not support conversion, client should check config response. **Details:** - .. ts:def:: IntegrationConfig + .. ts:def:: ConversionConfig - interface IntegrationConfig { + interface ConversionConfig { // libtool-style representation of the Bank protocol version, see // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning // The format is "current:revision:age". @@ -66,6 +67,9 @@ is used by wallets for withdrawals that involve a currency conversion. // Additional information on conversion rates. // Those informations should never be used to perform conversions, // use /cashin-rate or /cashout-rate instead. + // Conversion rates can change at any time. Clients must deal with + // any resulting errors and call /cashin-rate or /cashout-rate again + // to use the new rates. conversion_rate: ConversionRate; } @@ -177,30 +181,30 @@ is used by wallets for withdrawals that involve a currency conversion. // Exchange rate to buy regional currency from fiat cashin_ratio: DecimalNumber; - // Exchange rate to sell regional currency for fiat - cashout_ratio: DecimalNumber; - // Fee to subtract after applying the cashin ratio. cashin_fee: Amount; - // Fee to subtract after applying the cashout ratio. - cashout_fee: Amount; - // Minimum amount authorised for cashin, in fiat before conversion cashin_min_amount: Amount; - // Minimum amount authorised for cashout, in regional before conversion - cashout_min_amount: Amount; - // Smallest possible regional amount, converted amount is rounded to this amount cashin_tiny_amount: Amount; - // Smallest possible fiat amount, converted amount is rounded to this amount - cashout_tiny_amount: Amount; - // Rounding mode used during cashin conversion cashin_rounding_mode: "zero" | "up" | "nearest"; + // Exchange rate to sell regional currency for fiat + cashout_ratio: DecimalNumber; + + // Fee to subtract after applying the cashout ratio. + cashout_fee: Amount; + + // Minimum amount authorised for cashout, in regional before conversion + cashout_min_amount: Amount; + + // Smallest possible fiat amount, converted amount is rounded to this amount + cashout_tiny_amount: Amount; + // Rounding mode used during cashout conversion cashout_rounding_mode: "zero" | "up" | "nearest"; } diff --git a/core/api-corebank.rst b/core/api-corebank.rst @@ -744,7 +744,7 @@ Cashouts **Response:** - :http:statuscode:`200 Accepted`: + :http:statuscode:`200 OK`: The cashout request was correctly created and the TAN authentication now is pending. This returns the `CashoutPending` response.