post-conversion-rate.rst (1886B)
1 .. http:post:: /conversion-rate 2 3 This endpoint allows the administrator to update the global exchange rate between the regional currency and the fiat currency of the banking system. Individual users can have different rate if they are part of an conversion rate classe. 4 5 The conversion is calculated as follows: ``(amount * ratio - fee) / tiny_amount``. 6 7 Only available to the administrator. 8 9 **Request:** 10 11 .. ts:def:: ConversionRate 12 13 interface ConversionRate { 14 // Minimum fiat amount authorised for cashin before conversion 15 cashin_min_amount: Amount; 16 17 // Exchange rate to buy regional currency from fiat 18 cashin_ratio: DecimalNumber; 19 20 // Regional amount fee to subtract after applying the cashin ratio. 21 cashin_fee: Amount; 22 23 // Smallest possible regional amount, converted amount is rounded to this amount 24 cashin_tiny_amount: Amount; 25 26 // Rounding mode used during cashin conversion 27 cashin_rounding_mode: "zero" | "up" | "nearest"; 28 29 // Minimum regional amount authorised for cashout before conversion 30 cashout_min_amount: Amount; 31 32 // Exchange rate to sell regional currency for fiat 33 cashout_ratio: DecimalNumber; 34 35 // Fiat amount fee to subtract after applying the cashout ratio. 36 cashout_fee: Amount; 37 38 // Smallest possible fiat amount, converted amount is rounded to this amount 39 cashout_tiny_amount: Amount; 40 41 // Rounding mode used during cashout conversion 42 cashout_rounding_mode: "zero" | "up" | "nearest"; 43 } 44 45 **Response:** 46 47 :http:statuscode:`204 No content`: 48 Operation successful. 49 :http:statuscode:`401 Unauthorized`: 50 Invalid credentials or missing rights. 51 :http:statuscode:`403 Forbidden`: 52 Missing rights. 53 :http:statuscode:`501 Not implemented`: 54 This server does not support conversion, client should check config response.