[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-docs] branch master updated: corebank: move optional conversion r
From: |
gnunet |
Subject: |
[taler-docs] branch master updated: corebank: move optional conversion rate info to /config |
Date: |
Thu, 19 Oct 2023 12:36:34 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository docs.
The following commit(s) were added to refs/heads/master by this push:
new 14fc31f0 corebank: move optional conversion rate info to /config
14fc31f0 is described below
commit 14fc31f083a4cbb1ae110f9d243d5faf6a9569c1
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Oct 19 12:36:31 2023 +0200
corebank: move optional conversion rate info to /config
---
core/api-corebank.rst | 63 ++++++++++++++-------------------------------------
1 file changed, 17 insertions(+), 46 deletions(-)
diff --git a/core/api-corebank.rst b/core/api-corebank.rst
index 86288540..84dc0765 100644
--- a/core/api-corebank.rst
+++ b/core/api-corebank.rst
@@ -86,6 +86,23 @@ Config
// Only applicable if have_cashout=true.
fiat_currency?: CurrencySpecification;
+ // Extra conversion rate information.
+ // Only present if conversion is supported and the server opts in
+ // to report the static conversion rate.
+ conversion_info?: {
+ // Exchange rate to buy the local currency from the external one
+ buy_at_ratio: DecimalNumber;
+
+ // Exchange rate to sell the local currency for the external one
+ sell_at_ratio: DecimalNumber;
+
+ // Fee to subtract after applying the buy ratio.
+ buy_in_fee: DecimalNumber;
+
+ // Fee to subtract after applying the sell ratio.
+ sell_out_fee: DecimalNumber;
+ }
+
}
@@ -901,52 +918,6 @@ Cashouts
Aborted cashout operations will also not be found.
-Conversion rates
-----------------
-
-..
- FIXME: throughout API docs and implementations, the following names
- are used interchangeably: local, regional, internal currency. As well
- these: external, fiat, currency. Style should tend to use only one.
-
-.. http:get:: /conversion-rates
-
- This call shows the current conversion rates between the local and the
- external currency. The external currency is the one mentioned in the
- *fiat_currency* field of `Config`.
-
- **Response:**
-
- :http:statuscode:`200 OK`: `ConversionRatesResponse`.
-
- :http:statuscode:`404 Not Found`: the bank doesn't provide any conversion
service.
-
- .. ts:def:: ConversionRatesResponse
-
- interface ConversionRatesResponse {
-
- // Exchange rate to buy the local currency from the external one
- buy_at_ratio: DecimalNumber;
-
- // Exchange rate to sell the local currency for the external one
- sell_at_ratio: DecimalNumber;
-
- // Fee to subtract after applying the buy ratio.
- buy_in_fee: DecimalNumber;
-
- // Fee to subtract after applying the sell ratio.
- sell_out_fee: DecimalNumber;
- }
-
- For example, given a local currency LC, a fiat currency FC,
- a *sell_at_ratio* = 0.9 and *sell_out_fee* = 0.03, selling
- 10 LC would result in the following FC: (10 * 0.9) - 0.03
- = 8.97 FC. On the other hand, given *buy_at_ratio* = 1.1
- and *buy_in_fee* = 0.01, a user wanting to spend 10 FC to
- buy the LC would result in the following LC: (10 * 1.1) -
- 0.01 = 10.99 LC.
-
-
Monitor
-------
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-docs] branch master updated: corebank: move optional conversion rate info to /config,
gnunet <=