Cd Module - Request

The fields of the Data object supported by a Cd module request are defined in alphabetical order below:

🟥 Data

TypeRequired
Objectyes

The Data object encapsulates the request data for a given module, and must always be provided.

Fields: 🔹BasisDays, 🔹Calculate, 🔹Compounding, 🔹FV, 🔹PV, 🔹Rate, 🔹Term, 🔹TermUnits

Objects: 🟦 Format

The fields of the Data object supported by a Cd module request are defined in alphabetical order below:

🔹 Data.BasisDays

TypeRequiredValuesDefault
Stringno360, 365365

If the compounding frequency (see below) is based upon a daily method (e.g. daily, continuous, or simple), then the number of days in a year is specified with this field. If no value is specified, then 365 is assumed.

🔹 Data.Calculate

TypeRequiredValuesDefault
StringnoPV, FV, Rate, TermFV

This field informs the SCE which of the four basic variables involved in a CD is to be calculated (e.g. PV, FV, Rate, or Term).

In the sample above, the calculation type being requested is FV (future value). Thus, the PV, Rate, and Term fields are included in the request, whereas the FV field is omitted.

🔹 Data.Compounding

TypeRequiredValuesDefault
StringnoAnnual, Semiannual, Quarterly, Bimonthly, Monthly, Semimonthly, Daily, Continuous, SimpleMonthly

The Compounding field defines the periodicity at which interest is computed. The specified compounding period affects the allowable values (and units) for the Term and TermUnits fields - please see the description below.

The simple compounding frequency does no compounding of interest at all. Instead, interest is computed at the end of the CD's term (much like a single payment note using a simple interest accrual method).

🔹 Data.FV

TypeRequiredValuesDefault
StringnoCurrencyn/a

The future value is the amount that the CD is worth at the end of it's term. The future value is equal to the present value plus all interest accrued during the CD's term. If you are computing the future value (e.g. "CalcType" : "FV"), then you may omit this field.

🔹 Data.PV

TypeRequiredValuesDefault
StringnoCurrencyn/a

The present value is the amount which is deposited in the CD on the given deposit date. Interest accrues on this initial amount, much like interest accrues on the principal balance of a loan. If you are computing the present value (e.g. "CalcType" : "PV"), then you may omit this field.

🔹 Data.Rate

TypeRequiredValuesDefault
StringnoNumber in [-99.999...600]n/a

This field dictates the rate at which interest accrues throughout the term of the CD. If you are computing the interest rate (e.g. "CalcType" : "Rate"), then you may omit this field.

🔹 Data.Term

TypeRequiredValuesDefault
StringnoInteger > 0n/a

The Term field specifies the number of unit term periods after which the CD has matured. This numerical value can specify the number of days, months, or years which make up the term of the CD. To specify the units, please see the TermUnits field below.

Also note that the value of this field is somewhat restricted given certain compounding frequencies and term units. The table below will summarize the restrictions.

CompoundingUnits AllowedTerm Restriction
AnnualYears, MonthsMonths must be divisible by 12
SemiannualYears, MonthsMonths must be divisible by 6
QuarterlyYears, MonthsMonths must be divisible by 3
BimonthlyYears, MonthsMonths must be divisible by 2
MonthlyYears, Monthsn/a
SemimonthlyYears, Monthsn/a
DailyYears, Months, Daysn/a
ContinuousYears, Months, Daysn/a
SimpleYears, Months, Daysn/a

🔹 Data.TermUnits

TypeRequiredValuesDefault
StringnoYears, Months, DaysMonths

This field specifies the units used for the CD's term. The three options are: Years, Months, and Days.


🟦 Data.Format

TypeRequired
Objectno

The Format object is one of the first objects parsed from a request, as various fields affect how date and numeric fields are parsed and validated.

Fields: 🔹CurrencyDecimals, 🔹DateFormat, 🔹DateSeparator, 🔹DecimalSeparator, 🔹StrictDP, 🔹ThousandSeparator

Objects: None

🔹 Data.Format.CurrencyDecimals

TypeRequiredValuesDefault
Stringno0 or 22

When displaying and parsing Currency fields, this field determines the maximum number of decimal places allowed after the DecimalSeparator.

🔹 Data.Format.DateFormat

TypeRequiredValuesDefault
StringnoYMD, MDY, or DMYYMD

When displaying and parsing Date fields, this field determines the expected format for all Date fields. The following DateFormat options are allowed:

  • YMD - All dates should be formated as YYYY-MM-DD.
  • MDY - All dates should be formated as MM-DD-YYYY.
  • DMY - All dates should be formated as DD-MM-YYYY.

Note that the character which separates the individual month, day, and year portions of the date is configurable via the DateSeparator field.

🔹 Data.Format.DateSeparator

TypeRequiredValuesDefault
Stringnoempty or a single character-

When displaying and parsing Date fields, this field determines the character used to separate the individual month, day, and year portions of a date field.

🔹 Data.Format.DecimalSeparator

TypeRequiredValuesDefault
Stringnoempty or a single character.

When displaying and parsing Currency, Percentage, or Floating numeric fields, this field determines the character used to separate the fractional part from the whole.

🔹 Data.Format.StrictDP

TypeRequiredValuesDefault
Booleannotrue, falsefalse

If the value of this field is true, then the SCE will strictly verify the number of decimal places allowed for currency input values. Thus, if the calling application sends in a request with a currency amount of 1000.005, the SCE will return an error code.

If the value of this field is set to false, then currency values sent in with an invalid number of decimal places will be rounded to the correct number of decimal places by the SCE (using five/four rounding), and a warning message with this information will be returned with the response.

🔹 Data.Format.ThousandSeparator

TypeRequiredValuesDefault
Stringnoempty or a single characterempty

When displaying numeric fields, this field determines the character used to separate the thousands places from the hundreds. When parsing a numeric request field, if a thousand separator is specified in the request, then the SCE will now remove all occurrences of the specified thousand separator from the numeric field string before attempting to convert it to a number.