Cd Module - Request
The fields of the Data object supported by a Cd module request are defined
in alphabetical order below:
| Object | Fields |
|---|---|
🟥 Data | 🔹BasisDays, 🔹Calculate, 🔹Compounding, 🔹FV, 🔹PV, 🔹Rate, 🔹Term, 🔹TermUnits |
🟦 Format | 🔹CurrencyDecimals, 🔹DateFormat, 🔹DateSeparator, 🔹DecimalSeparator, 🔹StrictDP, 🔹ThousandSeparator |
🟥 Data
| Type | Required |
|---|---|
| Object | yes |
The Data object encapsulates the request data for a given module, and must always be provided.
Fields:
🔹BasisDays,🔹Calculate,🔹Compounding,🔹FV,🔹PV,🔹Rate,🔹Term,🔹TermUnitsObjects:
🟦 Format
The fields of the Data object supported by a Cd module request are defined
in alphabetical order below:
🔹 Data.BasisDays
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | 360, 365 | 365 |
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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | PV, FV, Rate, Term | FV |
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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Annual, Semiannual, Quarterly, Bimonthly, Monthly, Semimonthly, Daily, Continuous, Simple | Monthly |
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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Currency | n/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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Currency | n/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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Number 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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Integer > 0 | n/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.
| Compounding | Units Allowed | Term Restriction |
|---|---|---|
| Annual | Years, Months | Months must be divisible by 12 |
| Semiannual | Years, Months | Months must be divisible by 6 |
| Quarterly | Years, Months | Months must be divisible by 3 |
| Bimonthly | Years, Months | Months must be divisible by 2 |
| Monthly | Years, Months | n/a |
| Semimonthly | Years, Months | n/a |
| Daily | Years, Months, Days | n/a |
| Continuous | Years, Months, Days | n/a |
| Simple | Years, Months, Days | n/a |
🔹 Data.TermUnits
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | Years, Months, Days | Months |
This field specifies the units used for the CD's term. The three options are: Years, Months, and Days.
🟦 Data.Format
| Type | Required |
|---|---|
| Object | no |
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,🔹ThousandSeparatorObjects:
None
🔹 Data.Format.CurrencyDecimals
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | 0 or 2 | 2 |
When displaying and parsing Currency fields, this field determines the maximum
number of decimal places allowed after the
DecimalSeparator.
🔹 Data.Format.DateFormat
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | YMD, MDY, or DMY | YMD |
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 asYYYY-MM-DD.MDY- All dates should be formated asMM-DD-YYYY.DMY- All dates should be formated asDD-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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | empty 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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | empty 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
| Type | Required | Values | Default |
|---|---|---|---|
| Boolean | no | true, false | false |
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
| Type | Required | Values | Default |
|---|---|---|---|
| String | no | empty or a single character | empty |
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.