ofx4js
Version:
A javascript OFX library, ported from OFX4J
122 lines (121 loc) • 4.2 kB
TypeScript
import { BaseSecurityInfo } from "./BaseSecurityInfo";
import { SecurityId } from "./SecurityId";
import { OptionType } from "./OptionType";
import { AssetClass } from "./AssetClass";
/**
* Info about an option security.
* @see "Section 13.8.5.4, OFX Spec"
*/
export declare class OptionSecurityInfo extends BaseSecurityInfo {
private optionType;
private strikePrice;
private expirationDate;
private sharesPerContact;
private underlyingSecurity;
private assetClass;
private fiAssetClass;
/**
* Gets the type of option. One of "PUT" or "CALL". This is a required field according to the
* OFX spec.
*
* @return the option type
*/
getOptionType(): string;
/**
* Sets the type of option. One of "PUT" or "CALL". This is a required field according to the
* OFX spec.
*
* @param optionType the option type
*/
setOptionType(optionType: string): void;
/**
* Gets the option type as a well-known enum value.
*
* @return the option type or null if it's not one of the well-known types
*/
getOptionTypeEnum(): OptionType;
/**
* Gets the strike price of the option. This is a required field according to the OFX spec.
*
* @return the option strike price
*/
getStrikePrice(): number;
/**
* Sets the strike price of the option. This is a required field according to the OFX spec.
*
* @param strikePrice the option strike price
*/
setStrikePrice(strikePrice: number): void;
/**
* Gets the expiration date of the option. This is a required field according to the OFX spec.
*
* @return the expiration date of the option
*/
getExpirationDate(): Date;
/**
* Sets the expiration date of the option. This is a required field according to the OFX spec.
*
* @param expirationDate the expiration date of the option
*/
setExpirationDate(expirationDate: Date): void;
/**
* Gets the number of shares per option contact. This is a required field according to the OFX
* spec.
*
* @return the number of shares per option contact
*/
getSharesPerContact(): number;
/**
* Sets the number of shares per option contact. This is a required field according to the OFX
* spec.
*
* @param sharesPerContact the number of shares per option contact
*/
setSharesPerContact(sharesPerContact: number): void;
/**
* Gets the security id of the underling security. This is an optional field according to the OFX
* spec.
*
* @return the security id of the underlying security
*/
getUnderlyingSecurity(): SecurityId;
/**
* Sets the security id of the underling security. This is an optional field according to the OFX
* spec.
*
* @param underlyingSecurity the security id of the underlying security
*/
setUnderlyingSecurity(underlyingSecurity: SecurityId): void;
/**
* Gets the asset class of the option. This is an optional field according to the OFX spec.
*
* @return the asset class of the option
*/
getAssetClass(): string;
/**
* Sets the asset class of the option. This is an optional field according to the OFX spec.
*
* @param assetClass the asset class of the option
*/
setAssetClass(assetClass: string): void;
/**
* Gets the assert class as one of the well-known types.
*
* @return the asset class or null if it's not one of the well-known types
*/
getAssetClassEnum(): AssetClass;
/**
* Gets the FI-defined asset class of the option. This is an optional field according to the OFX
* spec.
*
* @return the FI-defined asset class of the option
*/
getFiAssetClass(): string;
/**
* Sets the FI-defined asset class of the option. This is an optional field according to the OFX
* spec.
*
* @param fiAssetClass the FI-defined asset class of the option
*/
setFiAssetClass(fiAssetClass: string): void;
}