All files / src/models contract-details.model.ts

100% Statements 30/30
100% Branches 0/0
100% Functions 0/0
100% Lines 26/26

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 1238x 8x           8x     8x       8x       8x       8x       8x           8x       8x           8x           8x           8x           8x           8x       8x       8x       8x       8x       8x             8x               8x       8x       8x             8x   8x        
import {arrayProperty, model, property} from "@waytrade/microservice-core";
import {Contract} from "./contract.model";
 
/**
 * Contract details on Interactive Brokers.
 */
@model("Details of a contract on Interactive Brokers.")
export class ContractDetails {
  /** A fully-defined Contract object. */
  @property("A fully-defined Contract object.")
  contract?: Contract;
 
  /** The market name for this product. */
  @property("The market name for this product.")
  marketName?: string;
 
  /** The minimum allowed price variation. */
  @property("The minimum allowed price variation.")
  minTick?: number;
 
  /** Supported order types for this product.  */
  @property("Supported order types for this product.")
  orderTypes?: string;
 
  /**Valid exchange fields when placing an order for this contract.  */
  @property("Valid exchange fields when placing an order for this contract.")
  validExchanges?: string;
 
  /** For derivatives, the contract ID (conID) of the underlying instrument. */
  @property(
    "For derivatives, the contract ID (conID) of the underlying instrument.",
  )
  underConId?: number;
 
  /**	Descriptive name of the product. */
  @property("Descriptive name of the product.")
  longName?: string;
 
  /**Typically the contract month of the underlying for a Future contract. */
  @property(
    "Typically the contract month of the underlying for a Future contract.",
  )
  contractMonth?: string;
 
  /** The industry classification of the underlying/product. For example, Financial. */
  @property(
    "The industry classification of the underlying/product. For example, Financial.",
  )
  industry?: string;
 
  /** The industry category of the underlying. For example, InvestmentSvc. */
  @property(
    "The industry category of the underlying. For example, InvestmentSvc.",
  )
  category?: string;
 
  /**	The industry subcategory of the underlying. For example, Brokerage. */
  @property(
    "The industry subcategory of the underlying. For example, Brokerage.",
  )
  subcategory?: string;
 
  /** The time zone for the trading hours of the product. For example, EST. */
  @property(
    "The time zone for the trading hours of the product. For example, EST.",
  )
  timeZoneId?: string;
 
  /**The trading hours of the product. */
  @property("The trading hours of the product.")
  tradingHours?: string;
 
  /** The liquid hours of the product.*/
  @property("The liquid hours of the product.")
  liquidHours?: string;
 
  /** Tick Size Multiplier. */
  @property("Tick size multiplier.")
  mdSizeMultiplier?: number;
 
  /** For derivatives, the symbol of the underlying contract. */
  @property("For derivatives, the symbol of the underlying contract.")
  underSymbol?: string;
 
  /**	For derivatives, the underlying security type. */
  @property("For derivatives, the underlying security type.")
  underSecType?: string;
 
  /**
   * The list of market rule IDs separated by comma Market rule IDs can
   * be used to determine the minimum price increment at a given price.
   */
  @property("For derivatives, the underlying security type.")
  marketRuleIds?: string;
 
  /**
   * Real expiration date.
   *
   * Requires TWS 968+ and API v973.04+.
   */
  @property("Real expiration date.")
  realExpirationDate?: string;
 
  /** Last trade time. */
  @property("Last trade time.")
  lastTradeTime?: string;
 
  /** Stock type.  */
  @property("Stock type.")
  stockType?: string;
}
 
/**
 * A list of contract details.
 */
@model("A list of contract details.")
export class ContractDetailsList {
  @arrayProperty(ContractDetails, "Array of contract details")
  details?: ContractDetails[];
}