taler-docs

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

commit 70dd5696c40c6b53348f65de79688c8e5bf10d93
parent 0d4306f1906abec49fc57266116ac26ee0a1ee0b
Author: Antoine A <>
Date:   Sat, 17 Aug 2024 11:06:44 +0200

conversion: improve doc

Diffstat:
Mcore/api-bank-conversion-info.rst | 17++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/core/api-bank-conversion-info.rst b/core/api-bank-conversion-info.rst @@ -1,7 +1,7 @@ .. This file is part of GNU TALER. - Copyright (C) 2014-2023 Taler Systems SA + Copyright (C) 2014-2024 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software @@ -177,35 +177,38 @@ is used by wallets for withdrawals that involve a currency conversion. the exchange rate between the regional currency and the fiat currency of the banking system. + The conversion is calculated as follows: `(amount * ratio - fee) / tiny_amount` + + **Request:** .. ts:def:: ConversionRate interface ConversionRate { + // Minimum fiat amount authorised for cashin before conversion + cashin_min_amount: Amount; + // Exchange rate to buy regional currency from fiat cashin_ratio: DecimalNumber; // Regional amount fee to subtract after applying the cashin ratio. cashin_fee: Amount; - // Minimum fiat amount authorised for cashin before conversion - cashin_min_amount: Amount; - // Smallest possible regional amount, converted amount is rounded to this amount cashin_tiny_amount: Amount; // Rounding mode used during cashin conversion cashin_rounding_mode: "zero" | "up" | "nearest"; + // Minimum regional amount authorised for cashout before conversion + cashout_min_amount: Amount; + // Exchange rate to sell regional currency for fiat cashout_ratio: DecimalNumber; // Fiat amount fee to subtract after applying the cashout ratio. cashout_fee: Amount; - // Minimum regional amount authorised for cashout before conversion - cashout_min_amount: Amount; - // Smallest possible fiat amount, converted amount is rounded to this amount cashout_tiny_amount: Amount;