diff options
author | Antoine A <> | 2023-11-24 15:21:44 +0000 |
---|---|---|
committer | Antoine A <> | 2023-11-24 15:21:44 +0000 |
commit | 0d00da41443c2f6be1bf473858a643042cc912c3 (patch) | |
tree | cf82636465d14927b5b261f0f4eeeb4af8addf1b | |
parent | 595f538463bb43c1299d1d9151267cf16ec9b4ac (diff) | |
download | docs-0d00da41443c2f6be1bf473858a643042cc912c3.tar.gz docs-0d00da41443c2f6be1bf473858a643042cc912c3.tar.bz2 docs-0d00da41443c2f6be1bf473858a643042cc912c3.zip |
Fix conversion info API
-rw-r--r-- | core/api-bank-conversion-info.rst | 36 | ||||
-rw-r--r-- | core/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 index e86db957..ee8a8de3 100644 --- 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 index 03d26c06..24977134 100644 --- 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. |