@glue42/bbg-market-data
Version:
A high-level API that wraps existing Glue42 Bloomberg Bridge Market Data interop methods. The API is based on the jBloomberg open source wrapper.
231 lines (230 loc) • 8 kB
TypeScript
/**
* Determines the frequency and calendar type of the output. To be used in conjunction with `PeriodicitySelection`.
*/
export declare enum PeriodicityAdjustment {
/**
* Will return data up to the specified end date or up to the current date (if the end date is not specified).
*/
ACTUAL = "ACTUAL",
/**
* For pricing fields, this reverts to the last business day of the specified calendar period.
* Calendar Quarterly (CQ), Calendar Semi-Annually (CS) or Calendar Yearly (CY).
*/
CALENDAR = "CALENDAR",
/**
* These periods revert to the fiscal period end for the company: Fiscal Quarterly (FQ), Fiscal Semi- Annually (FS) and Fiscal Yearly (FY) only.
*/
FISCAL = "FISCAL"
}
/**
* Determines the frequency of the output. To be used in conjunction with `PeriodicityAdjustment`.
*/
export declare enum PeriodicitySelection {
/**
* Returns one data point per day.
*/
DAILY = "DAILY ",
/**
* Returns one data point per month.
*/
MONTHLY = "MONTHLY ",
/**
* Returns one data point per quarter.
*/
QUARTERLY = "QUARTERLY ",
/**
* Returns one data point per half a year.
*/
SEMI_ANNUALLY = "SEMI_ANNUALLY ",
/**
* Returns one data point per week.
*/
WEEKLY = "WEEKLY ",
/**
* Returns one data point per year.
*/
YEARLY = "YEARLY "
}
/**
* Options for including/excluding non-trading days from the returned data.
*/
export declare enum FillOptions {
/**
* Includes only active days (days where the instrument and field pair have been updated) in the returned data set.
*/
ACTIVE_DAYS_ONLY = "ACTIVE_DAYS_ONLY",
/**
* Includes all days of the calendar in the returned data set.
*/
ALL_CALENDAR_DAYS = "ALL_CALENDAR_DAYS",
/**
* Includes all business week days (Monday to Friday) in the data set.
*/
NON_TRADING_WEEKDAYS = "NON_TRADING_WEEKDAYS"
}
/**
* Defines what values to be returned when a field has no value for a specific date.
*/
export declare enum FillMethod {
/**
* Returns a blank value for the `value` property of the returned `SecurityData` field.
*/
NIL_VALUE = "NIL_VALUE",
/**
* Retrieves the previous value available for this security field.
*/
PREVIOUS_VALUE = "PREVIOUS_VALUE"
}
/**
* Indicates whether to use the average or the closing price in quote calculation.
*/
export declare enum OverrideOption {
/**
* Use the closing price in quote calculation.
*/
OVERRIDE_OPTION_CLOSE = "OVERRIDE_OPTION_CLOSE",
/**
* Use the average price in quote calculation.
*/
OVERRIDE_OPTION_GPA = "OVERRIDE_OPTION_GPA"
}
/**
* Sets the quote to "price" or "yield" for a debt instrument the default value of which
* is quoted in "yield" (depending on the pricing source).
*/
export declare enum PricingOption {
/**
* Sets the quote to "price".
*/
PRICING_OPTION_PRICE = "PRICING_OPTION_PRICE",
/**
* Sets the quote to "yield".
*/
PRICING_OPTION_YIELD = "PRICING_OPTION_YIELD"
}
/**
* Arguments object for a `HistoricalDataRequest`.
*/
export interface HistoricalDataRequestArguments {
/**
* Securities for which to fetch the corresponding fields.
*/
securities: string[];
/**
* Security fields for which to request data.
*/
fields: string[];
/**
* First date of the period for which to retrieve data.
* Date format: `yyyymmdd`.
*/
startDate: string;
/**
* End date of the period for which to retrieve data.
* Date format: `yyyymmdd`.
*/
endDate: string;
/**
* Determines the frequency and calendar type of the output.
* To be used in conjunction with `periodicitySelection`.
*/
periodicityAdjustment: PeriodicityAdjustment;
/**
* Determines the frequency of the output.
* To be used in conjunction with `periodicityAdjustment`.
*/
periodicitySelection: PeriodicitySelection;
/**
* Currency in ISO code (USD, GBP, EUR, etc.).
*/
currency: string;
/**
* Indicates whether to use the average or the closing price in quote calculation.
*/
overrideOption: OverrideOption;
/**
* Sets quote to "price" or "yield" for a debt instrument
* the default value of which is quoted in "yield" (depending on the pricing source).
*/
pricingOption: PricingOption;
/**
* Maximum number of data points to return.
*/
maxDataPoints: number;
/**
* Returns the entitlement identifiers associated with the security.
*/
returnEids: boolean;
/**
* Specifies whether to include/exclude non-trading days where no data was generated for a respective field.
*/
nonTradingDayFillOption: FillOptions;
/**
* Specifies what data to be returned fir non-trading days.
*/
nonTradingDayFillMethod: FillMethod;
/**
* Adjusts for “change on day”.
* Adjust historical pricing to reflect: Regular Cash, Interim, 1st Interim, 2nd Interim,
* 3rd Interim, 4th Interim, 5th Interim, Income, Estimated, Partnership Distribution,
* Final, Interest on Capital, Distribution, Prorated.
*/
adjustmentNormal: boolean;
/**
* Adjusts for abnormal cash dividends.
* Adjust historical pricing to reflect: Special Cash, Liquidation, Capital Gains,
* Long-Term Capital Gains, Short-Term Capital Gains, Memorial, Return of Capital, Rights Redemption,
* Miscellaneous, Return Premium, Preferred Rights Redemption, Proceeds/Rights, Proceeds/Shares, Proceeds/Warrants.
*/
adjustmentAbnormal: boolean;
/**
* Capital changes defaults.
* Adjust historical pricing and/or volume to reflect: Spin-Offs, Stock Splits/Consolidations,
* Stock Dividend/Bonus, Rights Offerings/Entitlement.
*/
adjustmentSplit: boolean;
/**
* Follow the Bloomberg Professional service function `DPDF <GO>`.
* Setting this to `true` follows the `DPDF <GO>` BloombergProfessional service function.
* @default true
*/
adjustmentFollowDPDF: boolean;
/**
* Returns the data based on the calendar of the specified country, Exchange or religion from `CDR <GO>`.
* Takes a 2-character calendar code as a null-terminated string.
* This will cause the data to be aligned according to the calendar and include calendar holidays.
* Applies only to `DAILY` requests.
*/
calendarCodeOverride: string;
/**
* Returns data based on the calendar codes of multiple country, Exchange or religious calendars from `CDR <GO>`.
* This will cause the data to be aligned according to the set calendar(s),
* including their calendar holidays. Only applies to `DAILY` requests.
*/
calendarOverridesInfo: {
/**
* Calendar overrides. Accepts 2-character calendar codes as null-terminated strings.
*/
calendarOverrides: string[];
/**
* Specifies whether to return a data point if a date is a valid trading day in all calendars specified in the request (`CDR_AND`),
* or if a date is a valid trading day in any of the specified calendars (`CDR_OR`).
* @default "CDR_AND"
*/
calendarOverridesOperation: 'CDR_AND' | 'CDR_OR';
};
/**
* Appends overrides to modify the calculation.
*/
overrides: {
/**
* Accepts a field mnemonic or alpha-numeric code, such as `PR092` or `PRICING_SOURCE`.
* See `FLDS <GO>` for list of possible overrides.
*/
fieldId: string;
/**
* The desired override value.
*/
value: any;
}[];
}