Contents

POST /conversion-rate-classes#

Create a new conversion rate classe.

Only available to the administrator.

Since protocol v9.

Request:

interface ConversionRateClassInput {
  // The name of this class
  name: string;

  // A description of the class
  description?: string;

  // 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;

  // 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;

  // Rounding mode used during cashout conversion
  cashout_rounding_mode?: "zero" | "up" | "nearest";
}

Response:

200 OK:

The conversion rate class request was correctly created. This returns the ConversionRateClassResponse response.

401 Unauthorized:

Invalid or missing credentials.

403 Forbidden:

Missing rights.

409 Conflict:
  • TALER_EC_BANK_NAME_REUSE : name already used.

501 Not implemented:

This server does not support conversion, client should check config response.

Details:

interface ConversionRateClassResponse {
  // ID identifying the conversion rate class being created
  conversion_rate_class_id: Integer;
}