// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComboLeg {
/// The Contract's IB's unique id.
#[prost(int32, optional, tag = "1")]
pub con_id: ::core::option::Option<i32>,
/// The rate of the leg's shares compared to the Order's totalQuantity. Final number of shares acquired will be equal to ( ratio * totalQuantity ).
#[prost(int32, optional, tag = "2")]
pub ratio: ::core::option::Option<i32>,
/// The side (buy or sell) of the leg: For individual accounts, only BUY and SELL are available. SSHORT is for institutions.
#[prost(string, optional, tag = "3")]
pub action: ::core::option::Option<::prost::alloc::string::String>,
/// The destination exchange to which the order will be routed.
#[prost(string, optional, tag = "4")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// Specifies whether an order is an open or closing order. For institutional customers to determine if this order is to open or close a position. 0 – Same as the parent security. This is the only option for retail customers. 1 – Open. This value is only valid for institutional customers. 2 – Close. This value is only valid for institutional customers. 3 – Unknown.
#[prost(int32, optional, tag = "5")]
pub open_close: ::core::option::Option<i32>,
/// Used for IBExecution accounts to indicate if a leg is short.
#[prost(int32, optional, tag = "6")]
pub short_sales_slot: ::core::option::Option<i32>,
/// When ShortSaleSlot is 2, this field shall contain the designated location.
#[prost(string, optional, tag = "7")]
pub designated_location: ::core::option::Option<::prost::alloc::string::String>,
/// Mark order as exempt from short sale uptick rule. Possible values: 0 – Does not apply the rule. -1 – Applies the short sale uptick rule.
#[prost(int32, optional, tag = "8")]
pub exempt_code: ::core::option::Option<i32>,
/// Limit price by leg. All legs must contain perLegPrice if used.
#[prost(double, optional, tag = "9")]
pub per_leg_price: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeltaNeutralContract {
/// The unique contract identifier specifying the security. Used for Delta-Neutral Combo contracts.
#[prost(int32, optional, tag = "1")]
pub con_id: ::core::option::Option<i32>,
/// The underlying stock or future delta. Used for Delta-Neutral Combo contracts.
#[prost(double, optional, tag = "2")]
pub delta: ::core::option::Option<f64>,
/// The price of the underlying. Used for Delta-Neutral Combo contracts.
#[prost(double, optional, tag = "3")]
pub price: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Contract {
/// The unique IB contract identifier.
#[prost(int32, optional, tag = "1")]
pub con_id: ::core::option::Option<i32>,
/// The underlying's asset symbol.
#[prost(string, optional, tag = "2")]
pub symbol: ::core::option::Option<::prost::alloc::string::String>,
/// The security's type: STK – stock (or ETF) OPT – option FUT – future IND – index FOP – futures option CASH – forex pair BAG – combo WAR – warrant BOND- bond CMDTY- commodity NEWS- news FUND- mutual fund.
#[prost(string, optional, tag = "3")]
pub sec_type: ::core::option::Option<::prost::alloc::string::String>,
/// The contract's last trading day or contract month (for Options and Futures). Strings with format YYYYMM will be interpreted as the Contract Month whereas YYYYMMDD will be interpreted as Last Trading Day.
#[prost(string, optional, tag = "4")]
pub last_trade_date_or_contract_month: ::core::option::Option<
::prost::alloc::string::String,
>,
/// The option's strike price.
#[prost(double, optional, tag = "5")]
pub strike: ::core::option::Option<f64>,
/// Either Put or Call (i.e. Options). Valid values are P, PUT, C, CALL.
#[prost(string, optional, tag = "6")]
pub right: ::core::option::Option<::prost::alloc::string::String>,
/// The instrument's multiplier (i.e. options, futures).
#[prost(double, optional, tag = "7")]
pub multiplier: ::core::option::Option<f64>,
/// The destination exchange.
#[prost(string, optional, tag = "8")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// The contract's primary exchange. For smart routed contracts, used to define contract in case of ambiguity.Should be defined as native exchange of contract. For exchanges which contain a period in name, will only be part of exchange name prior to period, i.e. ENEXT for ENEXT.BE.
#[prost(string, optional, tag = "9")]
pub primary_exch: ::core::option::Option<::prost::alloc::string::String>,
/// The underlying's currency.
#[prost(string, optional, tag = "10")]
pub currency: ::core::option::Option<::prost::alloc::string::String>,
/// The contract's symbol within its primary exchange. For options, this will be the OCC symbol.
#[prost(string, optional, tag = "11")]
pub local_symbol: ::core::option::Option<::prost::alloc::string::String>,
/// The trading class name for this contract. Available in TWS contract description window as well. For example, weekly S&P options are "SPXW" compared to the monthly contract which uses "SPX".
#[prost(string, optional, tag = "12")]
pub trading_class: ::core::option::Option<::prost::alloc::string::String>,
/// Security's identifier when querying contract's details or placing orders ISIN – Example: Apple: US0378331005 CUSIP – Example: Apple: 037833100.
#[prost(string, optional, tag = "13")]
pub sec_id_type: ::core::option::Option<::prost::alloc::string::String>,
/// Identifier of the security type.
#[prost(string, optional, tag = "14")]
pub sec_id: ::core::option::Option<::prost::alloc::string::String>,
/// Description of the contract.
#[prost(string, optional, tag = "15")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
/// IssuerId of the contract.
#[prost(string, optional, tag = "16")]
pub issuer_id: ::core::option::Option<::prost::alloc::string::String>,
/// Delta and underlying price for Delta-Neutral combo orders. Underlying (STK or FUT).
#[prost(message, optional, tag = "17")]
pub delta_neutral_contract: ::core::option::Option<DeltaNeutralContract>,
/// If set to true, contract details requests and historical data queries can be performed pertaining to expired futures contracts. Expired options or other instrument types are not available.
#[prost(bool, optional, tag = "18")]
pub include_expired: ::core::option::Option<bool>,
/// Details for each leg of the combination contract.
#[prost(string, optional, tag = "19")]
pub combo_legs_descrip: ::core::option::Option<::prost::alloc::string::String>,
/// The legs of a combined contract definition.
#[prost(message, repeated, tag = "20")]
pub combo_legs: ::prost::alloc::vec::Vec<ComboLeg>,
/// The contract's last trading day.
#[prost(string, optional, tag = "21")]
pub last_trade_date: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScannerParametersRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTicksRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// The datetime when the request should be submitted. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
#[prost(string, optional, tag = "3")]
pub start_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
#[prost(string, optional, tag = "4")]
pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// Number of distinct data points. Max is 1000 per request.
#[prost(int32, optional, tag = "5")]
pub number_of_ticks: ::core::option::Option<i32>,
/// Data source type.
#[prost(string, optional, tag = "6")]
pub what_to_show: ::core::option::Option<::prost::alloc::string::String>,
/// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
#[prost(bool, optional, tag = "7")]
pub use_rth: ::core::option::Option<bool>,
/// Omit updates that reflect only changes in size, and not price. Applicable to Bid\_Ask data requests.
#[prost(bool, optional, tag = "8")]
pub ignore_size: ::core::option::Option<bool>,
/// Should be defined as *null*; reserved for internal use.
#[prost(map = "string, string", tag = "9")]
pub misc_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelTickByTick {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RerouteMarketDataRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The unique IB contract identifier.
#[prost(int32, optional, tag = "2")]
pub con_id: ::core::option::Option<i32>,
/// The destination exchange.
#[prost(string, optional, tag = "3")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AutoOpenOrdersRequest {
/// If set to true, the newly created orders will be assigned an API order ID and implicitly associated with this client. If set to false, future orders will continue to bind to original client ID.
#[prost(bool, optional, tag = "1")]
pub auto_bind: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickSnapshotEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountUpdateMulti {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "2")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
#[prost(string, optional, tag = "3")]
pub model_code: ::core::option::Option<::prost::alloc::string::String>,
/// The value being updated.
#[prost(string, optional, tag = "4")]
pub key: ::core::option::Option<::prost::alloc::string::String>,
/// Representative information for a given Key.
#[prost(string, optional, tag = "5")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
/// The underlying's currency.
#[prost(string, optional, tag = "6")]
pub currency: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ApiSettingsConfig {
/// true indicates modifications cannot be made throuh the API.
#[prost(bool, optional, tag = "1")]
pub read_only_api: ::core::option::Option<bool>,
/// If set to true, Mutual Fund API client can send monetary value for BUY order and NOT send CashQty, or send CashQty and NOT send totalQuantity.
#[prost(bool, optional, tag = "2")]
pub total_quantity_for_mutual_funds: ::core::option::Option<bool>,
/// Declare that all open orders be returned to EWrapper.OpenOrders.
#[prost(bool, optional, tag = "3")]
pub download_open_orders_on_connection: ::core::option::Option<bool>,
/// true to include VirtualFX in the EWrapper.positions reponses.
#[prost(bool, optional, tag = "4")]
pub include_virtual_fx_positions: ::core::option::Option<bool>,
/// Prepare profit and loss value calculations when downloading positions data.
#[prost(bool, optional, tag = "5")]
pub prepare_daily_pn_l: ::core::option::Option<bool>,
/// Receive notifications for every order change from volatility.
#[prost(bool, optional, tag = "6")]
pub send_status_updates_for_volatility_orders: ::core::option::Option<bool>,
/// Define API message encoding. Supports "osCodePage" (For C++) or "ascii7".
#[prost(string, optional, tag = "7")]
pub encode_api_messages: ::core::option::Option<::prost::alloc::string::String>,
/// Supported socket port connection allowed for API connection requests.
#[prost(int32, optional, tag = "8")]
pub socket_port: ::core::option::Option<i32>,
/// If this flag is checked, orders that are automatically bound to an API client as a result of reqOpenOrders or reqAutoOpenOrders calls or system-generated orders like volatility hedging orders, will be assigned negative API Order ID numbers. If this flag is unchecked, orders bound as a result of reqOpenOrders or reqAutoOpenOrders calls will be assigned incremental API Order ID numbers. Volatility hedging orders will be assigned API Order ID numbers in the format 'parent order API ID + 1" when possible.
#[prost(bool, optional, tag = "9")]
pub use_negative_auto_range: ::core::option::Option<bool>,
/// Toggle if an API log should be created.
#[prost(bool, optional, tag = "10")]
pub create_api_message_log_file: ::core::option::Option<bool>,
/// true to have market data included in API logs.
#[prost(bool, optional, tag = "11")]
pub include_market_data_in_log_file: ::core::option::Option<bool>,
/// Flag as true to have Trader Workstation expose the complete known look-ahead trading schedule to the API, which is one week for most products. Leave unchecked to only send trading schedule for today plus the next open trading day.
#[prost(bool, optional, tag = "12")]
pub expose_trading_schedule_to_api: ::core::option::Option<bool>,
/// False: The API "Cash Balance" includes the "Insured Bank Deposit Sweep Program" balance. True: Report "Cash Balance" and "Insured Bank Deposit Sweep Program" balances separately in the API.
#[prost(bool, optional, tag = "13")]
pub split_insured_deposit_from_cash_balance: ::core::option::Option<bool>,
/// True will return all positions that have already closed with a '0' value.
#[prost(bool, optional, tag = "14")]
pub send_zero_positions_for_today_only: ::core::option::Option<bool>,
/// Internal use. Market data management.
#[prost(bool, optional, tag = "15")]
pub let_api_account_requests_switch_subscription: ::core::option::Option<bool>,
/// See [Unification of Groups and Profiles](<https://www.interactivebrokers.com/docs/tws-api/doc/financial-advisors/unification-of-groups-and-profiles>) for details.
#[prost(bool, optional, tag = "16")]
pub use_account_groups_with_allocation_methods: ::core::option::Option<bool>,
/// Level of detail for API logs. Supports "system", "warning", "error", "info" and "detail".
#[prost(string, optional, tag = "17")]
pub logging_level: ::core::option::Option<::prost::alloc::string::String>,
/// The master identifier for order updates.
#[prost(int32, optional, tag = "18")]
pub master_client_id: ::core::option::Option<i32>,
/// When amount of data sent by the Trader Workstation becomes too large, it is possible that network connection to API client cannot handle the load. Trader Workstation waits for specified amount of seconds and then disconnects API client if data cannot be sent fast enough.
#[prost(int32, optional, tag = "19")]
pub bulk_data_timeout: ::core::option::Option<i32>,
/// Delimeter for smartComponentMap.
#[prost(string, optional, tag = "20")]
pub component_exch_separator: ::core::option::Option<::prost::alloc::string::String>,
/// True indicates forex market data uses 1/10 pips instead of 1/2.
#[prost(bool, optional, tag = "21")]
pub show_forex_data_in1_10pips: ::core::option::Option<bool>,
/// If true, forex trades can be received in 1/10 pips instead of 1/2.
#[prost(bool, optional, tag = "22")]
pub allow_forex_trading_in1_10pips: ::core::option::Option<bool>,
/// Account values will be rounded to whole numbers instead of precise values.
#[prost(bool, optional, tag = "23")]
pub round_account_values_to_nearest_whole_number: ::core::option::Option<bool>,
/// Deliver market data as represented in lots rather than direct share sizes.
#[prost(bool, optional, tag = "24")]
pub send_market_data_in_lots_for_us_stocks: ::core::option::Option<bool>,
/// True indicates AdvancedOrderReject messages will appear in the UI instead of through the socket.
#[prost(bool, optional, tag = "25")]
pub show_advanced_order_reject_in_ui: ::core::option::Option<bool>,
/// false indicates the API messages above maximum allowed message rate will be paced at max-msg/second. true indicates overhead messages will be rejected instantly to ensure timely response.
#[prost(bool, optional, tag = "26")]
pub reject_messages_above_max_rate: ::core::option::Option<bool>,
/// true to maintain API connection if requests are sent with incorrect API socket attributes.
#[prost(bool, optional, tag = "27")]
pub maintain_connection_on_incorrect_fields: ::core::option::Option<bool>,
/// Indicate "ISLAND" is a valid exchange value for NASDAQ listed stocks.
#[prost(bool, optional, tag = "28")]
pub compatibility_mode_nasdaq_stocks: ::core::option::Option<bool>,
/// Historical data will be returned based on the indicated value. Supported values include "instrument": representing the timezone of the instrument's primary listing exchange; "operator": representing the local timezone set in TWS or IBG; and "utc": representing the Coordinated Universal Time.
#[prost(string, optional, tag = "29")]
pub send_instrument_timezone: ::core::option::Option<::prost::alloc::string::String>,
/// Foreign exchange values will be delivered as integer rates instead of decimal.
#[prost(bool, optional, tag = "30")]
pub send_forex_data_in_compatibility_mode: ::core::option::Option<bool>,
/// true to submit orders that attempted transmissions while disconnected from the network.
#[prost(bool, optional, tag = "31")]
pub maintain_and_resubmit_orders_on_reconnect: ::core::option::Option<bool>,
/// The maximum data size for historical bars. Supports 1, 4, 16.
#[prost(int32, optional, tag = "32")]
pub historical_data_max_size: ::core::option::Option<i32>,
/// True to net event contract trades.
#[prost(bool, optional, tag = "33")]
pub auto_report_netting_event_contract_trades: ::core::option::Option<bool>,
/// Definition of how options should behave when exercised.
#[prost(string, optional, tag = "34")]
pub option_exercise_request_type: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Determine if API connections are only permitted from localhost. If this value is true, trustedIPs will be ignored.
#[prost(bool, optional, tag = "35")]
pub allow_localhost_only: ::core::option::Option<bool>,
/// A string of IP addresses that may connect to the Trader Workstation.
#[prost(string, repeated, tag = "36")]
pub trusted_i_ps: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelAccountUpdatesMulti {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsProvidersRequest {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TickOptionComputation {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Type of data the tick represents.
#[prost(int32, optional, tag = "2")]
pub tick_type: ::core::option::Option<i32>,
/// Defines TickAttrib.canAutoExecute.
#[prost(int32, optional, tag = "3")]
pub tick_attrib: ::core::option::Option<i32>,
/// Implied volatility of the Option.
#[prost(double, optional, tag = "4")]
pub implied_vol: ::core::option::Option<f64>,
/// The stock's Delta. For orders on BOX only.
#[prost(double, optional, tag = "5")]
pub delta: ::core::option::Option<f64>,
/// The option price.
#[prost(double, optional, tag = "6")]
pub opt_price: ::core::option::Option<f64>,
/// The present value of dividends expected on the option's underlying.
#[prost(double, optional, tag = "7")]
pub pv_dividend: ::core::option::Option<f64>,
/// The option Gamma value.
#[prost(double, optional, tag = "8")]
pub gamma: ::core::option::Option<f64>,
/// Option greek Vega.
#[prost(double, optional, tag = "9")]
pub vega: ::core::option::Option<f64>,
/// Option Greek Theta.
#[prost(double, optional, tag = "10")]
pub theta: ::core::option::Option<f64>,
/// Current price of the underlying contract.
#[prost(double, optional, tag = "11")]
pub und_price: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserInfoRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CurrentTimeInMillis {
/// 13 digit timestamp indicating current Epoch timestamp with millisecond precision.
#[prost(int64, optional, tag = "1")]
pub current_time_in_millis: ::core::option::Option<i64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountValue {
/// The value being updated.
#[prost(string, optional, tag = "1")]
pub key: ::core::option::Option<::prost::alloc::string::String>,
/// Representative information for a given Key.
#[prost(string, optional, tag = "2")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
/// The underlying's currency.
#[prost(string, optional, tag = "3")]
pub currency: ::core::option::Option<::prost::alloc::string::String>,
/// The account identifier.
#[prost(string, optional, tag = "4")]
pub account_name: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OpenOrdersRequest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelCalculateImpliedVolatility {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionFilter {
/// Client identifier the order was submitted through.
#[prost(int32, optional, tag = "1")]
pub client_id: ::core::option::Option<i32>,
/// Account identifier that executed the trade.
#[prost(string, optional, tag = "2")]
pub acct_code: ::core::option::Option<::prost::alloc::string::String>,
/// Declare the date/time to receive executions at and after the designated time. Can be used in combination with LastNDays or SpecificDates. Requests should be formatted as "YYYYMMDD HH:mm:ss TMZ" or in UTC as "YYYYMMDD-HH:mm:ss". If no date is passed, the current date is assumed.
#[prost(string, optional, tag = "3")]
pub time: ::core::option::Option<::prost::alloc::string::String>,
/// Instrument's symbol.
#[prost(string, optional, tag = "4")]
pub symbol: ::core::option::Option<::prost::alloc::string::String>,
/// Asset type being monitored.
#[prost(string, optional, tag = "5")]
pub sec_type: ::core::option::Option<::prost::alloc::string::String>,
/// Exchange where the symbol was traded.
#[prost(string, optional, tag = "6")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// Determine if only Buy or Sell orders are returned.
#[prost(string, optional, tag = "7")]
pub side: ::core::option::Option<::prost::alloc::string::String>,
/// Number of previous days to receive trades for. Maximum 7.
#[prost(int32, optional, tag = "8")]
pub last_n_days: ::core::option::Option<i32>,
/// Retrieve a specific date within the past week to receive executions for. May be used with Time, but only the executions on the Specified Dates will return. Array formatted as \[YYYYMMDD\].
#[prost(int32, repeated, tag = "9")]
pub specific_dates: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalculateImpliedVolatilityRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Hypothetical option price.
#[prost(double, optional, tag = "3")]
pub option_price: ::core::option::Option<f64>,
/// Current price of the underlying contract.
#[prost(double, optional, tag = "4")]
pub under_price: ::core::option::Option<f64>,
/// Internal use only. Send an empty tag value list.
#[prost(map = "string, string", tag = "5")]
pub implied_volatility_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CommissionAndFeesReport {
/// The execution's identifier affiliated with this commission.
#[prost(string, optional, tag = "1")]
pub exec_id: ::core::option::Option<::prost::alloc::string::String>,
/// The combined cost of commissions and fees.
#[prost(double, optional, tag = "2")]
pub commission_and_fees: ::core::option::Option<f64>,
/// The currency denoting the value of the commissionAndFees.
#[prost(string, optional, tag = "3")]
pub currency: ::core::option::Option<::prost::alloc::string::String>,
/// The realized profit and loss from the execution.
#[prost(double, optional, tag = "4")]
pub realized_pnl: ::core::option::Option<f64>,
/// Annual interest divided by mark price.
#[prost(double, optional, tag = "5")]
pub bond_yield: ::core::option::Option<f64>,
/// date expressed in yyyymmdd format.
#[prost(string, optional, tag = "6")]
pub yield_redemption_date: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CurrentTimeRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountSummary {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "2")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Unique tag indicating return data.
#[prost(string, optional, tag = "3")]
pub tag: ::core::option::Option<::prost::alloc::string::String>,
/// Representative information for a given Key.
#[prost(string, optional, tag = "4")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
/// The underlying's currency.
#[prost(string, optional, tag = "5")]
pub currency: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionMultiEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickAttribBidAsk {
/// Indicates the bid price is below the current Low for the day.
#[prost(bool, optional, tag = "1")]
pub bid_past_low: ::core::option::Option<bool>,
/// Indicates the ask price is above the current High for the day.
#[prost(bool, optional, tag = "2")]
pub ask_past_high: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTickBidAsk {
/// The UNIX timestamp of the historical tick.
#[prost(int64, optional, tag = "1")]
pub time: ::core::option::Option<i64>,
/// Unique attributes of the tick data.
#[prost(message, optional, tag = "2")]
pub tick_attrib_bid_ask: ::core::option::Option<TickAttribBidAsk>,
/// Buy side price of the order.
#[prost(double, optional, tag = "3")]
pub price_bid: ::core::option::Option<f64>,
/// Sell side price of the order.
#[prost(double, optional, tag = "4")]
pub price_ask: ::core::option::Option<f64>,
/// Number of shares in the buy side.
#[prost(string, optional, tag = "5")]
pub size_bid: ::core::option::Option<::prost::alloc::string::String>,
/// Number of shares in the sell side.
#[prost(string, optional, tag = "6")]
pub size_ask: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTicksBidAsk {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// A list of HistoricalTickBidAsk objects.
#[prost(message, repeated, tag = "2")]
pub historical_ticks_bid_ask: ::prost::alloc::vec::Vec<HistoricalTickBidAsk>,
/// Flag the end of historical data.
#[prost(bool, optional, tag = "3")]
pub is_done: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelRealTimeBars {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TickGeneric {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Type of data the tick represents.
#[prost(int32, optional, tag = "2")]
pub tick_type: ::core::option::Option<i32>,
/// Representative information for a given Key.
#[prost(double, optional, tag = "3")]
pub value: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ApiPrecautionsConfig {
/// If set to true, all order precautions will be bypassed and directly submitted without warning.
#[prost(bool, optional, tag = "1")]
pub bypass_order_precautions: ::core::option::Option<bool>,
/// Bypass order precautions related to Bond trading.
#[prost(bool, optional, tag = "2")]
pub bypass_bond_warning: ::core::option::Option<bool>,
/// If true, you are electing to bypass any warning that your API-transmitted order will result in a negative yield to worst (YTW), excluding commissions. These orders will be executed without warning.
#[prost(bool, optional, tag = "3")]
pub bypass_negative_yield_confirmation: ::core::option::Option<bool>,
/// If set to true, you are electing to bypass warning regarding called bond contract used in order.
#[prost(bool, optional, tag = "4")]
pub bypass_called_bond_warning: ::core::option::Option<bool>,
/// If set to true, orders will submit for same-action combos without warning.
#[prost(bool, optional, tag = "5")]
pub bypass_same_action_pair_trade_warning: ::core::option::Option<bool>,
/// Bypass warnings against flagged accounts submitting orders.
#[prost(bool, optional, tag = "6")]
pub bypass_flagged_accounts_warning: ::core::option::Option<bool>,
/// If set to true, order will be submitted in spite of volatility concerns for the order.
#[prost(bool, optional, tag = "7")]
pub bypass_price_based_volatility_warning: ::core::option::Option<bool>,
/// If set to true, direct routed orders will be submitted without warning.
#[prost(bool, optional, tag = "8")]
pub bypass_redirect_order_warning: ::core::option::Option<bool>,
/// Waive warnings that your submitted order is being passed without overfill protection.
#[prost(bool, optional, tag = "9")]
pub bypass_no_overfill_protection: ::core::option::Option<bool>,
/// If set to true, orders will route to designated exchanges regardless of current best bid and offer.
#[prost(bool, optional, tag = "10")]
pub bypass_route_marketable_to_bbo: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ApiConfig {
/// Proto object containing API Precaution settings.
#[prost(message, optional, tag = "1")]
pub precautions: ::core::option::Option<ApiPrecautionsConfig>,
/// Represents an ApiSettingsConfig object to be submitted with the API Config.
#[prost(message, optional, tag = "2")]
pub settings: ::core::option::Option<ApiSettingsConfig>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Object containing parameters to filter the returned executions.
#[prost(message, optional, tag = "2")]
pub execution_filter: ::core::option::Option<ExecutionFilter>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OpenOrdersEnd {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ContractDataEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramDataEntry {
/// The price of the histogram event.
#[prost(double, optional, tag = "1")]
pub price: ::core::option::Option<f64>,
/// Represents volume of the order data.
#[prost(string, optional, tag = "2")]
pub size: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The number of histogram data points returned.
#[prost(message, repeated, tag = "2")]
pub histogram_data_entries: ::prost::alloc::vec::Vec<HistogramDataEntry>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WshMetaDataRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ErrorMessage {
/// The order's unique identifier. If a new order is placed with an order ID less than or equal to the order ID of a previous order an error will occur.
#[prost(int32, optional, tag = "1")]
pub id: ::core::option::Option<i32>,
/// The Unix timestamp of when the error took place.
#[prost(int64, optional, tag = "2")]
pub error_time: ::core::option::Option<i64>,
/// The code identifying the error.
#[prost(int32, optional, tag = "3")]
pub error_code: ::core::option::Option<i32>,
/// The error's description.
#[prost(string, optional, tag = "4")]
pub error_msg: ::core::option::Option<::prost::alloc::string::String>,
/// Advanced order rejection message providing additional depth for error.
#[prost(string, optional, tag = "5")]
pub advanced_order_reject_json: ::core::option::Option<
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScannerSubscription {
/// Determine the number of rows or results from the market scanner to be returned. Returns the maximum, 50, by default.
#[prost(int32, optional, tag = "1")]
pub number_of_rows: ::core::option::Option<i32>,
/// Returns the Instrument type to be returned. See scannerParameters xml response for details.
#[prost(string, optional, tag = "2")]
pub instrument: ::core::option::Option<::prost::alloc::string::String>,
/// Returns the exchange regions to be returned. See scannerParameters xml response for details.
#[prost(string, optional, tag = "3")]
pub location_code: ::core::option::Option<::prost::alloc::string::String>,
/// Returns the code to sort results by. See scannerParameters xml response for details.
#[prost(string, optional, tag = "4")]
pub scan_code: ::core::option::Option<::prost::alloc::string::String>,
/// Set the maximum MARK price to filter by.
#[prost(double, optional, tag = "5")]
pub above_price: ::core::option::Option<f64>,
/// Set the minimum MARK price to filter by.
#[prost(double, optional, tag = "6")]
pub below_price: ::core::option::Option<f64>,
/// Set the minimum trade volume of the day.
#[prost(int64, optional, tag = "7")]
pub above_volume: ::core::option::Option<i64>,
/// Set the minimum market cap restriction.
#[prost(double, optional, tag = "8")]
pub market_cap_above: ::core::option::Option<f64>,
/// Set the maximum market cap restriction.
#[prost(double, optional, tag = "9")]
pub market_cap_below: ::core::option::Option<f64>,
/// Minimum Moody Rating.
#[prost(string, optional, tag = "10")]
pub moody_rating_above: ::core::option::Option<::prost::alloc::string::String>,
/// Maximum Moody Rating.
#[prost(string, optional, tag = "11")]
pub moody_rating_below: ::core::option::Option<::prost::alloc::string::String>,
/// Standard & Poor's (S&P) uses a letter-based rating system to evaluate the creditworthiness of bonds and debt issuers. This field will indicate the lowest acceptable rating to be returned from the result.
#[prost(string, optional, tag = "12")]
pub sp_rating_above: ::core::option::Option<::prost::alloc::string::String>,
/// Standard & Poor's (S&P) uses a letter-based rating system to evaluate the creditworthiness of bonds and debt issuers. This field will indicate the highest acceptable rating to be returned from the result.
#[prost(string, optional, tag = "13")]
pub sp_rating_below: ::core::option::Option<::prost::alloc::string::String>,
/// Set the minimum Maturity date. Formatted as YYYYMMDD.
#[prost(string, optional, tag = "14")]
pub maturity_date_above: ::core::option::Option<::prost::alloc::string::String>,
/// Set the maximum Maturity date. Formatted as YYYYMMDD.
#[prost(string, optional, tag = "15")]
pub maturity_date_below: ::core::option::Option<::prost::alloc::string::String>,
/// Set the minimum Coupon Rate.
#[prost(double, optional, tag = "16")]
pub coupon_rate_above: ::core::option::Option<f64>,
/// Set the maximum Coupon Rate.
#[prost(double, optional, tag = "17")]
pub coupon_rate_below: ::core::option::Option<f64>,
/// Determine of the bond should be convertible or not.
#[prost(bool, optional, tag = "18")]
pub exclude_convertible: ::core::option::Option<bool>,
/// Determine the minimum average option volume from the underlying.
#[prost(int64, optional, tag = "19")]
pub average_option_volume_above: ::core::option::Option<i64>,
/// TagValue pair to indicate scanner restrictions. Currently only supports TagValue("annualVolatility", true) or an empty list.
#[prost(string, optional, tag = "20")]
pub scanner_setting_pairs: ::core::option::Option<::prost::alloc::string::String>,
/// Determine the stock type: Common, CORP, ADR, ETF, ETN, REIT, CEF, ETMF, EFN.
#[prost(string, optional, tag = "21")]
pub stock_type_filter: ::core::option::Option<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "22")]
pub scanner_subscription_filter_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(map = "string, string", tag = "23")]
pub scanner_subscription_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ManagedAccountsRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HistoricalNews {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Trigger time for the request. Formatted as HH:MM:ss (UTC assumed if timezone note set).
#[prost(string, optional, tag = "2")]
pub time: ::core::option::Option<::prost::alloc::string::String>,
/// News provider code based on requested data.
#[prost(string, optional, tag = "3")]
pub provider_code: ::core::option::Option<::prost::alloc::string::String>,
/// Identifier used to track the news article. See [EClient.reqNewsArticle](/tws-api/doc/news/news-articles/request-news-articles) for more details.
#[prost(string, optional, tag = "4")]
pub article_id: ::core::option::Option<::prost::alloc::string::String>,
/// Headline of the provided news article.
#[prost(string, optional, tag = "5")]
pub headline: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyRequest {
/// Displays the third party API name.
#[prost(string, optional, tag = "1")]
pub api_name: ::core::option::Option<::prost::alloc::string::String>,
/// Displays the Client Version of the API connection.
#[prost(string, optional, tag = "2")]
pub api_version: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HistoricalNewsEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Returns whether there is more data (true) or not (false).
#[prost(bool, optional, tag = "2")]
pub has_more: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountUpdateMultiEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SmartComponentsRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Identifier for the exchange with the best bid and offer.
#[prost(string, optional, tag = "2")]
pub bbo_exchange: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FamilyCodesRequest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutionDetailsEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeadTimestampRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
#[prost(bool, optional, tag = "3")]
pub use_rth: ::core::option::Option<bool>,
/// Data source type.
#[prost(string, optional, tag = "4")]
pub what_to_show: ::core::option::Option<::prost::alloc::string::String>,
/// Using 1 will return UTC time in YYYYMMDD-hh:mm:ss format. Using 2 will return epoch time.
#[prost(int32, optional, tag = "5")]
pub format_date: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickAttribLast {
/// Indicate that a price is beyond the prior limit.
#[prost(bool, optional, tag = "1")]
pub past_limit: ::core::option::Option<bool>,
/// Flag if the tick was initially unreported.
#[prost(bool, optional, tag = "2")]
pub unreported: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTickLast {
/// The UNIX timestamp of the historical tick.
#[prost(int64, optional, tag = "1")]
pub time: ::core::option::Option<i64>,
/// Tick attribs of historical last tick.
#[prost(message, optional, tag = "2")]
pub tick_attrib_last: ::core::option::Option<TickAttribLast>,
/// The last price of the historical tick.
#[prost(double, optional, tag = "3")]
pub price: ::core::option::Option<f64>,
/// The last size of the historical tick.
#[prost(string, optional, tag = "4")]
pub size: ::core::option::Option<::prost::alloc::string::String>,
/// The source exchange of the historical tick.
#[prost(string, optional, tag = "5")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// The conditions of the historical tick. Refer to [Trade Conditions](<https://www.interactivebrokers.com/en/index.php?f=7235>) page for more details.
#[prost(string, optional, tag = "6")]
pub special_conditions: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTick {
/// Time affiliated with the trade.
#[prost(int64, optional, tag = "1")]
pub time: ::core::option::Option<i64>,
/// Price affiliated with the trade.
#[prost(double, optional, tag = "2")]
pub price: ::core::option::Option<f64>,
/// Size of the trade.
#[prost(string, optional, tag = "3")]
pub size: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TickByTickData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Type of data the tick represents.
#[prost(int32, optional, tag = "2")]
pub tick_type: ::core::option::Option<i32>,
#[prost(oneof = "tick_by_tick_data::Tick", tags = "3, 4, 5")]
pub tick: ::core::option::Option<tick_by_tick_data::Tick>,
}
/// Nested message and enum types in `TickByTickData`.
pub mod tick_by_tick_data {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Tick {
/// Requesting the last trade price.
#[prost(message, tag = "3")]
HistoricalTickLast(super::HistoricalTickLast),
/// Requesting bid and ask data.
#[prost(message, tag = "4")]
HistoricalTickBidAsk(super::HistoricalTickBidAsk),
/// Requesting the midpoint between bid and ask values.
#[prost(message, tag = "5")]
HistoricalTickMidPoint(super::HistoricalTick),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SecDefOptParamsRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Symbol of the underlying contract.
#[prost(string, optional, tag = "2")]
pub underlying_symbol: ::core::option::Option<::prost::alloc::string::String>,
/// The exchange on which the returned options are trading. Can be set to the empty string "" for all exchanges.
#[prost(string, optional, tag = "3")]
pub fut_fop_exchange: ::core::option::Option<::prost::alloc::string::String>,
/// Security or Asset type of the underlying contract.
#[prost(string, optional, tag = "4")]
pub underlying_sec_type: ::core::option::Option<::prost::alloc::string::String>,
/// IBKR Contract Identifier of the underlying contract.
#[prost(int32, optional, tag = "5")]
pub underlying_con_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderCancel {
/// Used by brokers and advisors when manually entering an order cancellation request. Format should be "YYYYMMDD-HH:mm:ss" using UTC as the timezone value.
#[prost(string, optional, tag = "1")]
pub manual_order_cancel_time: ::core::option::Option<::prost::alloc::string::String>,
/// Following [CME Rule 576](<https://www.cmegroup.com/rulebook/files/cme-group-Rule-576.pdf>), the ExtOperator field will signify the unique API operator at the time of trading for order management.
#[prost(string, optional, tag = "2")]
pub ext_operator: ::core::option::Option<::prost::alloc::string::String>,
/// Following [CME Rule 576](<https://www.cmegroup.com/rulebook/files/cme-group-Rule-576.pdf>), the ManualOrderIndicator field will signify if an order is manual (1) or automated (0).
#[prost(int32, optional, tag = "3")]
pub manual_order_indicator: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelOrderRequest {
/// The API client's order id.
#[prost(int32, optional, tag = "1")]
pub order_id: ::core::option::Option<i32>,
/// An OrderCancel object that can receive the manualOrderCancelTime, manualOrderIndicator, and extOperator fields. See OrderCancel Reference for more insight on the [OrderCancel class](<https://www.interactivebrokers.com/docs/tws-api/ref/order-cancel>).
#[prost(message, optional, tag = "2")]
pub order_cancel: ::core::option::Option<OrderCancel>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PnLSingle {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The number of shares held for the contract.
#[prost(string, optional, tag = "2")]
pub position: ::core::option::Option<::prost::alloc::string::String>,
/// Current day's total profit and loss.
#[prost(double, optional, tag = "3")]
pub daily_pn_l: ::core::option::Option<f64>,
/// Unrealized profit and loss for the current day's trading session.
#[prost(double, optional, tag = "4")]
pub unrealized_pn_l: ::core::option::Option<f64>,
/// Daily realized profit and loss on the position.
#[prost(double, optional, tag = "5")]
pub realized_pn_l: ::core::option::Option<f64>,
/// Representative information for a given Key.
#[prost(double, optional, tag = "6")]
pub value: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AttachedOrders {
/// Order identifier of the attached stop loss from presets.
#[prost(int32, optional, tag = "1")]
pub sl_order_id: ::core::option::Option<i32>,
/// Order type for the attach stop loss from presets. Must be "PRESET".
#[prost(string, optional, tag = "2")]
pub sl_order_type: ::core::option::Option<::prost::alloc::string::String>,
/// Order ID for a preset profit taker order.
#[prost(int32, optional, tag = "3")]
pub pt_order_id: ::core::option::Option<i32>,
/// Order type for the profit take. Must be "PRESET".
#[prost(string, optional, tag = "4")]
pub pt_order_type: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelMarketDepth {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// True to request market data from SMART rather than a direct exchange.
#[prost(bool, optional, tag = "2")]
pub is_smart_depth: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountSummaryRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Financial Advisor allocation group. Individual accounts should submit "All".
#[prost(string, optional, tag = "2")]
pub group: ::core::option::Option<::prost::alloc::string::String>,
/// List of tags to retrieve details for.
#[prost(string, optional, tag = "3")]
pub tags: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HistoricalDataEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The start of the returned historical data. Formatted as "YYYYMMDD-HH:mm:ss" for UTC or "YYYYMMDD HH:mm:ss TMZ".
#[prost(string, optional, tag = "2")]
pub start_date_str: ::core::option::Option<::prost::alloc::string::String>,
/// Indicates the final bar returned. Formatted as "YYYYMMDD-HH:mm:ss" for UTC or "YYYYMMDD HH:mm:ss TMZ".
#[prost(string, optional, tag = "3")]
pub end_date_str: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TickPrice {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Type of data the tick represents.
#[prost(int32, optional, tag = "2")]
pub tick_type: ::core::option::Option<i32>,
/// The order's price.
#[prost(double, optional, tag = "3")]
pub price: ::core::option::Option<f64>,
/// Represents volume of the order data.
#[prost(string, optional, tag = "4")]
pub size: ::core::option::Option<::prost::alloc::string::String>,
/// Defines TickAttrib.canAutoExecute.
#[prost(int32, optional, tag = "5")]
pub attr_mask: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IdsRequest {
/// This parameter will not affect the value returned to nextValidId but is required.
#[prost(int32, optional, tag = "1")]
pub num_ids: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelHistoricalData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Position {
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "1")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// The number of shares held.
#[prost(string, optional, tag = "3")]
pub position: ::core::option::Option<::prost::alloc::string::String>,
/// Average cost of the overall position.
#[prost(double, optional, tag = "4")]
pub avg_cost: ::core::option::Option<f64>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionsRequest {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompletedOrdersRequest {
/// Determines if only API orders should be returned or if TWS submitted orders should be included.
#[prost(bool, optional, tag = "1")]
pub api_only: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepthData {
/// The ranking position in the DOM ladder.
#[prost(int32, optional, tag = "1")]
pub position: ::core::option::Option<i32>,
/// Indicates a change in the row's value.
#[prost(int32, optional, tag = "2")]
pub operation: ::core::option::Option<i32>,
/// 0 for ask, 1 for bid.
#[prost(int32, optional, tag = "3")]
pub side: ::core::option::Option<i32>,
/// The order's price.
#[prost(double, optional, tag = "4")]
pub price: ::core::option::Option<f64>,
/// Represents volume of the order data.
#[prost(string, optional, tag = "5")]
pub size: ::core::option::Option<::prost::alloc::string::String>,
/// The exchange holding the order if isSmartDepth is True, otherwise the MPID of the market maker.
#[prost(string, optional, tag = "6")]
pub market_maker: ::core::option::Option<::prost::alloc::string::String>,
/// True to request market data from SMART rather than a direct exchange.
#[prost(bool, optional, tag = "7")]
pub is_smart_depth: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractDescription {
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "1")]
pub contract: ::core::option::Option<Contract>,
/// Comma-separated list of available derivative security types.
#[prost(string, repeated, tag = "2")]
pub derivative_sec_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GlobalCancelRequest {
/// An OrderCancel object that can receive the manualOrderCancelTime, manualOrderIndicator, and extOperator fields. See [OrderCancel](<https://www.interactivebrokers.com/docs/tws-api/ref/order-cancel>) for more insight on the OrderCancel class.
#[prost(message, optional, tag = "1")]
pub order_cancel: ::core::option::Option<OrderCancel>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalNewsRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The unique IB contract identifier.
#[prost(int32, optional, tag = "2")]
pub con_id: ::core::option::Option<i32>,
/// A '+'-separated list of provider codes.
#[prost(string, optional, tag = "3")]
pub provider_codes: ::core::option::Option<::prost::alloc::string::String>,
/// The datetime when the request should be submitted. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
#[prost(string, optional, tag = "4")]
pub start_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
#[prost(string, optional, tag = "5")]
pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// Total number of news articles matching the request.
#[prost(int32, optional, tag = "6")]
pub total_results: ::core::option::Option<i32>,
/// Reserved for internal use. Should be defined as null.
#[prost(map = "string, string", tag = "7")]
pub historical_news_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarketDataType {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Type of market data to retrieve. {1: "Live market data is streaming data relayed back in real time. Market data subscriptions are required to receive live market data.", 2: "Frozen market data is the last data recorded at market close.", 3: "Free, delayed data is 15 – 20 minutes delayed.", 4: "Requests delayed “frozen” data for a user without market data subscriptions."}.
#[prost(int32, optional, tag = "2")]
pub market_data_type: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelHistoricalTicks {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyMessageRequest {
/// Displays data coming from a third party resource.
#[prost(string, optional, tag = "1")]
pub api_data: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SmartComponent {
/// Bit number to uniquely distinguish value.
#[prost(int32, optional, tag = "1")]
pub bit_number: ::core::option::Option<i32>,
/// The destination exchange.
#[prost(string, optional, tag = "2")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// Exchange symbol value.
#[prost(string, optional, tag = "3")]
pub exchange_letter: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarketDataTypeRequest {
/// Type of market data to retrieve.
#[prost(int32, optional, tag = "1")]
pub market_data_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DepthMarketDataDescription {
/// The destination exchange.
#[prost(string, optional, tag = "1")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// The security's type: STK – stock (or ETF) OPT – option FUT – future IND – index FOP – futures option CASH – forex pair BAG – combo WAR – warrant BOND- bond CMDTY- commodity NEWS- news FUND- mutual fund.
#[prost(string, optional, tag = "2")]
pub sec_type: ::core::option::Option<::prost::alloc::string::String>,
/// The primary exchange where the contract is listed.
#[prost(string, optional, tag = "3")]
pub listing_exch: ::core::option::Option<::prost::alloc::string::String>,
/// A list containing all available exchanges offering market depth.
#[prost(string, optional, tag = "4")]
pub service_data_type: ::core::option::Option<::prost::alloc::string::String>,
/// Aggregated group Indicates the smart-routing group to which a contract belongs. contracts which cannot be smart-routed have aggGroup = -1.
#[prost(int32, optional, tag = "5")]
pub agg_group: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelMarketData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SoftDollarTiersRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrdersSmartRoutingConfig {
/// Indicate an order should look for better pricing values beyond what was submitted.
#[prost(bool, optional, tag = "1")]
pub seek_price_improvement: ::core::option::Option<bool>,
/// For orders submitted before the open, true ensures your orders are routed prior to the open. This directive only applies to stocks listed on a major exchange that are routed using IB SmartRouting.
#[prost(bool, optional, tag = "2")]
pub pre_open_reroute: ::core::option::Option<bool>,
/// Declare that orders should not go through Interactive Brokers' Dark Pool.
#[prost(bool, optional, tag = "3")]
pub do_not_route_to_dark_pools: ::core::option::Option<bool>,
/// Default routing algorith when submitting orders as Smart. Supports "SMART", "SMART MaxRebate", "SMART PreferRebate", "SMART PreferFill", "SMART MaxFill", "SMART Primary", "SMART VRebate", "SMART VLowFee", "SMART DarkOnly".
#[prost(string, optional, tag = "4")]
pub default_algorithm: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrdersConfig {
/// Proto object containing data for how SMART routing should behave.
#[prost(message, optional, tag = "1")]
pub smart_routing: ::core::option::Option<OrdersSmartRoutingConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderCondition {
/// Type of order condition to be used. Supported values include: Price: 1, Time: 3, Margin: 4, Execution: 5, Volume: 6, PercentChange: 7.
#[prost(int32, optional, tag = "1")]
pub r#type: ::core::option::Option<i32>,
/// true to declare multiple conditions must be met (AND). False to declare any conidition should trigger conditional logic.
#[prost(bool, optional, tag = "2")]
pub is_conjunction_connection: ::core::option::Option<bool>,
/// The order condition will trigger if greater than the indicated value.
#[prost(bool, optional, tag = "3")]
pub is_more: ::core::option::Option<bool>,
/// The unique IB contract identifier.
#[prost(int32, optional, tag = "4")]
pub con_id: ::core::option::Option<i32>,
/// The destination exchange.
#[prost(string, optional, tag = "5")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// The underlying's asset symbol.
#[prost(string, optional, tag = "6")]
pub symbol: ::core::option::Option<::prost::alloc::string::String>,
/// The security's type: STK – stock (or ETF) OPT – option FUT – future IND – index FOP – futures option CASH – forex pair BAG – combo WAR – warrant BOND- bond CMDTY- commodity NEWS- news FUND- mutual fund.
#[prost(string, optional, tag = "7")]
pub sec_type: ::core::option::Option<::prost::alloc::string::String>,
/// Value to reflect percentage change to trigger a condition.
#[prost(int32, optional, tag = "8")]
pub percent: ::core::option::Option<i32>,
/// Decimal value representing change to trigger a condition.
#[prost(double, optional, tag = "9")]
pub change_percent: ::core::option::Option<f64>,
/// The price for the condition to trigger.
#[prost(double, optional, tag = "10")]
pub price: ::core::option::Option<f64>,
/// Specifies how the stop should trigger.
#[prost(int32, optional, tag = "11")]
pub trigger_method: ::core::option::Option<i32>,
/// Trigger time for the request. Formatted as HH:MM:ss (UTC assumed if timezone note set).
#[prost(string, optional, tag = "12")]
pub time: ::core::option::Option<::prost::alloc::string::String>,
/// The bar's traded volume (only returned for TRADES data).
#[prost(int32, optional, tag = "13")]
pub volume: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTicksLast {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// A list of HistoricalTickLast objects.
#[prost(message, repeated, tag = "2")]
pub historical_ticks_last: ::prost::alloc::vec::Vec<HistoricalTickLast>,
/// Flag the end of historical data.
#[prost(bool, optional, tag = "3")]
pub is_done: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalDataBar {
/// The start date of the bar's covered data.
#[prost(string, optional, tag = "1")]
pub date: ::core::option::Option<::prost::alloc::string::String>,
/// The bar's open price.
#[prost(double, optional, tag = "2")]
pub open: ::core::option::Option<f64>,
/// The bar's high price.
#[prost(double, optional, tag = "3")]
pub high: ::core::option::Option<f64>,
/// The bar's low price.
#[prost(double, optional, tag = "4")]
pub low: ::core::option::Option<f64>,
/// The bar's close price.
#[prost(double, optional, tag = "5")]
pub close: ::core::option::Option<f64>,
/// The bar's traded volume if available (only available for TRADES).
#[prost(string, optional, tag = "6")]
pub volume: ::core::option::Option<::prost::alloc::string::String>,
/// The bar's Weighted Average Price (only available for TRADES).
#[prost(string, optional, tag = "7")]
pub wap: ::core::option::Option<::prost::alloc::string::String>,
/// The number of trades that took place through the course of trading.
#[prost(int32, optional, tag = "8")]
pub bar_count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalDataUpdate {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Object representing Open, High, Low, Close, Volume, and Weighted Average Price over a given time period.
#[prost(message, optional, tag = "2")]
pub historical_data_bar: ::core::option::Option<HistoricalDataBar>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepthRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// The number of rows on each side of the order book.
#[prost(int32, optional, tag = "3")]
pub num_rows: ::core::option::Option<i32>,
/// True to request market data from SMART rather than a direct exchange.
#[prost(bool, optional, tag = "4")]
pub is_smart_depth: ::core::option::Option<bool>,
/// Internal use. Unique attributes for market data request.
#[prost(map = "string, string", tag = "5")]
pub market_depth_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalTicks {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// A list of HistoricalTick objects.
#[prost(message, repeated, tag = "2")]
pub historical_ticks: ::prost::alloc::vec::Vec<HistoricalTick>,
/// Flag the end of historical data.
#[prost(bool, optional, tag = "3")]
pub is_done: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SoftDollarTier {
/// The name of the Soft Dollar Tier.
#[prost(string, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
/// The value of the Soft Dollar Tier.
#[prost(string, optional, tag = "2")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
/// The display name of the Soft Dollar Tier.
#[prost(string, optional, tag = "3")]
pub display_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Order {
/// The API client id which placed the order.
#[prost(int32, optional, tag = "1")]
pub client_id: ::core::option::Option<i32>,
/// The API client's order id.
#[prost(int32, optional, tag = "2")]
pub order_id: ::core::option::Option<i32>,
/// The Host order identifier.
#[prost(int64, optional, tag = "3")]
pub perm_id: ::core::option::Option<i64>,
/// The order ID of the parent order, used for bracket and auto trailing stop orders.
#[prost(int32, optional, tag = "4")]
pub parent_id: ::core::option::Option<i32>,
/// Identifies the side. Supports BUY and SELL. IBExecution accounts may submit SSHORT and SLONG to denote an order as a short or long position.
#[prost(string, optional, tag = "5")]
pub action: ::core::option::Option<::prost::alloc::string::String>,
/// The number of positions being bought/sold.
#[prost(string, optional, tag = "6")]
pub total_quantity: ::core::option::Option<::prost::alloc::string::String>,
/// The publicly disclosed order size.
#[prost(int32, optional, tag = "7")]
pub display_size: ::core::option::Option<i32>,
/// The order's type.
#[prost(string, optional, tag = "8")]
pub order_type: ::core::option::Option<::prost::alloc::string::String>,
/// The limit price used for the order.
#[prost(double, optional, tag = "9")]
pub lmt_price: ::core::option::Option<f64>,
/// Generic field to contain the stop price for STP LMT orders, trailing amount, etc.
#[prost(double, optional, tag = "10")]
pub aux_price: ::core::option::Option<f64>,
/// The time in force. Valid values are: DAY – Valid for the day only. GTC – Good until canceled. The order will continue to work within the system and in the marketplace until it executes or is canceled. GTC orders will be automatically be cancelled under the following conditions: If a corporate action on a security results in a stock split (forward or reverse).
#[prost(string, optional, tag = "11")]
pub tif: ::core::option::Option<::prost::alloc::string::String>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "12")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Indicates the firm which will settle the trade. Institutions only.
#[prost(string, optional, tag = "13")]
pub settling_firm: ::core::option::Option<::prost::alloc::string::String>,
/// Specifies the true beneficiary of the order. For IBExecution customers. This value is required for FUT/FOP orders for reporting to the exchange.
#[prost(string, optional, tag = "14")]
pub clearing_account: ::core::option::Option<::prost::alloc::string::String>,
/// For execution-only clients to know where do they want their shares to be cleared at. Valid values are: IB.
#[prost(string, optional, tag = "15")]
pub clearing_intent: ::core::option::Option<::prost::alloc::string::String>,
/// Indicates whether or not all the order has to be filled on a single execution.
#[prost(bool, optional, tag = "16")]
pub all_or_none: ::core::option::Option<bool>,
/// If set to true, flags the order as a Block Order. A Block Order is a large volume limit order with a minimum of 50 contracts.
#[prost(bool, optional, tag = "17")]
pub block_order: ::core::option::Option<bool>,
/// If set to true, the order will not be visible when viewing the market depth. This option only applies to orders routed to the NASDAQ exchange.
#[prost(bool, optional, tag = "18")]
pub hidden: ::core::option::Option<bool>,
/// If set to true, allows orders to also trigger or fill outside of regular trading hours.
#[prost(bool, optional, tag = "19")]
pub outside_rth: ::core::option::Option<bool>,
/// An order that identifies the best price and the exact quantity offered/available at the price, and transmits the corresponding portion of your order for immediate execution. Simultaneously it is identifying the next best price and quantity offered/available, and submits the matching quantity of your order for immediate execution.
#[prost(bool, optional, tag = "20")]
pub sweep_to_fill: ::core::option::Option<bool>,
/// The percent offset amount for relative orders.
#[prost(double, optional, tag = "21")]
pub percent_offset: ::core::option::Option<f64>,
/// Specifies the trailing amount of a trailing stop order as a percentage. Observe the following guidelines when using the trailingPercent field: Guidelines * This field is mutually exclusive with the existing trailing amount. That is, the API client can send one or the other but not both. * This field is read AFTER the stop price (barrier price) as follows: deltaNeutralAuxPrice stopPrice, trailingPercent, scale order attributes. * The field will also be sent to the API in the openOrder message if the API client version is >= 56. It is sent after the stopPrice field as follows: stopPrice, trailingPct, basisPoint.
#[prost(double, optional, tag = "22")]
pub trailing_percent: ::core::option::Option<f64>,
/// Trail stop price for TRAIL LIMIT orders.
#[prost(double, optional, tag = "23")]
pub trail_stop_price: ::core::option::Option<f64>,
/// Identifies a minimum quantity order type.
#[prost(int32, optional, tag = "24")]
pub min_qty: ::core::option::Option<i32>,
/// Specifies the date and time after which the order will be active. Format: yyyymmdd hh:mm:ss {optional Timezone}.
#[prost(string, optional, tag = "25")]
pub good_after_time: ::core::option::Option<::prost::alloc::string::String>,
/// The date and time when the order should cancel if not already filled. Only valid for orders using the "GTD" tif. Users that would prefer to specify a number of seconds should use the Duration parameter instead. Both values cannot be specified at the same time.
#[prost(string, optional, tag = "26")]
pub good_till_date: ::core::option::Option<::prost::alloc::string::String>,
/// One-Cancels-All group identifier.
#[prost(string, optional, tag = "27")]
pub oca_group: ::core::option::Option<::prost::alloc::string::String>,
/// The custom order identifer.
#[prost(string, optional, tag = "28")]
pub order_ref: ::core::option::Option<::prost::alloc::string::String>,
/// Individual = 'I' Agency = 'A' AgentOtherMember = 'W' IndividualPTIA = 'J' AgencyPTIA = 'U' AgentOtherMemberPTIA = 'M' IndividualPT = 'K' AgencyPT = 'Y' AgentOtherMemberPT = 'N'.
#[prost(string, optional, tag = "29")]
pub rule80_a: ::core::option::Option<::prost::alloc::string::String>,
/// Tells how to handle remaining orders in an OCA group when one order or part of an order executes. Valid values are: 1 – Cancel all remaining orders with block. 2 – Remaining orders are proportionately reduced in size with block. 3 – Remaining orders are proportionately reduced in size with no block. If you use a value "with block" it gives the order overfill protection. This means that only one order in the group will be routed at a time to remove the possibility of an overfill.
#[prost(int32, optional, tag = "30")]
pub oca_type: ::core::option::Option<i32>,
/// Defines how a stop order should trigger. Supported Trigger Methods: {0: "Default", 1: "Double Bid/Ask", 2: "Last", 3: "Double Last", 4: "Bid/Ask", 7: "Last or Bid/Ask", 8: "Mid-point"}.
#[prost(int32, optional, tag = "31")]
pub trigger_method: ::core::option::Option<i32>,
/// Defines the start time of GTC orders.
#[prost(string, optional, tag = "32")]
pub active_start_time: ::core::option::Option<::prost::alloc::string::String>,
/// Defines the stop time of GTC orders.
#[prost(string, optional, tag = "33")]
pub active_stop_time: ::core::option::Option<::prost::alloc::string::String>,
/// The Financial Advisor group the trade will be allocated to. Use an empty string if not applicable.
#[prost(string, optional, tag = "34")]
pub fa_group: ::core::option::Option<::prost::alloc::string::String>,
/// The Financial Advisor allocation method the trade will be allocated to. Use an empty string if not applicable.
#[prost(string, optional, tag = "35")]
pub fa_method: ::core::option::Option<::prost::alloc::string::String>,
/// The Financial Advisor percentage concerning the trade's allocation. Use an empty string if not applicable.
#[prost(string, optional, tag = "36")]
pub fa_percentage: ::core::option::Option<::prost::alloc::string::String>,
/// The implied volatility to use for calculating the option price.
#[prost(double, optional, tag = "37")]
pub volatility: ::core::option::Option<f64>,
/// Values include: 1 – Daily Volatility 2 – Annual Volatility.
#[prost(int32, optional, tag = "38")]
pub volatility_type: ::core::option::Option<i32>,
/// Specifies whether TWS will automatically update the limit price of the order as the underlying price moves. VOL orders only.
#[prost(bool, optional, tag = "39")]
pub continuous_update: ::core::option::Option<bool>,
/// Specifies how you want TWS to calculate the limit price for options.
#[prost(int32, optional, tag = "40")]
pub reference_price_type: ::core::option::Option<i32>,
/// Enter an order type to instruct TWS to submit a delta neutral trade on full or partial execution of the VOL order. VOL orders only.
#[prost(string, optional, tag = "41")]
pub delta_neutral_order_type: ::core::option::Option<::prost::alloc::string::String>,
/// Use this field to enter a value if the value in the deltaNeutralOrderType field is an order type that requires an Aux price.
#[prost(double, optional, tag = "42")]
pub delta_neutral_aux_price: ::core::option::Option<f64>,
/// The unique contract identifier specifying the security in Delta Neutral order.
#[prost(int32, optional, tag = "43")]
pub delta_neutral_con_id: ::core::option::Option<i32>,
/// Specifies whether the order is an Open or a Close order and is used when the hedge involves a CFD and and the order is clearing away.
#[prost(string, optional, tag = "44")]
pub delta_neutral_open_close: ::core::option::Option<::prost::alloc::string::String>,
/// Used when the hedge involves a stock and indicates whether or not it is sold short.
#[prost(bool, optional, tag = "45")]
pub delta_neutral_short_sale: ::core::option::Option<bool>,
/// Indicates a short sale Delta Neutral order. Has a value of 1 (the clearing broker holds shares) or 2 (delivered from a third party).
#[prost(int32, optional, tag = "46")]
pub delta_neutral_short_sale_slot: ::core::option::Option<i32>,
/// Identifies third party order origin. Used only when deltaNeutralShortSaleSlot = 2.
#[prost(string, optional, tag = "47")]
pub delta_neutral_designated_location: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Defines the size of the first order to be scaled.
#[prost(int32, optional, tag = "48")]
pub scale_init_level_size: ::core::option::Option<i32>,
/// Defines the order size of the subsequent scale order components. For Scale orders only. Used in conjunction with scaleInitLevelSize().
#[prost(int32, optional, tag = "49")]
pub scale_subs_level_size: ::core::option::Option<i32>,
/// Defines the price increment between scale components. For Scale orders only. This value is compulsory.
#[prost(double, optional, tag = "50")]
pub scale_price_increment: ::core::option::Option<f64>,
/// Modifies the value of the Scale order. For extended Scale orders.
#[prost(double, optional, tag = "51")]
pub scale_price_adjust_value: ::core::option::Option<f64>,
/// Specifies the interval when the price is adjusted. For extended Scale orders.
#[prost(int32, optional, tag = "52")]
pub scale_price_adjust_interval: ::core::option::Option<i32>,
/// Specifies the offset when to adjust profit. For extended scale orders.
#[prost(double, optional, tag = "53")]
pub scale_profit_offset: ::core::option::Option<f64>,
/// Restarts the Scale series if the order is cancelled. For extended scale orders.
#[prost(bool, optional, tag = "54")]
pub scale_auto_reset: ::core::option::Option<bool>,
/// The initial position of the Scale order. For extended scale orders.
#[prost(int32, optional, tag = "55")]
pub scale_init_position: ::core::option::Option<i32>,
/// Specifies the initial quantity to be filled. For extended scale orders.
#[prost(int32, optional, tag = "56")]
pub scale_init_fill_qty: ::core::option::Option<i32>,
/// Defines the random percent by which to adjust the position. For extended scale orders.
#[prost(bool, optional, tag = "57")]
pub scale_random_percent: ::core::option::Option<bool>,
/// The list of scale orders. Used for scale orders.
#[prost(string, optional, tag = "58")]
pub scale_table: ::core::option::Option<::prost::alloc::string::String>,
/// For hedge orders. Possible values include: D – Delta B – Beta F – FX P – Pair.
#[prost(string, optional, tag = "59")]
pub hedge_type: ::core::option::Option<::prost::alloc::string::String>,
/// For hedge orders. Beta x for Beta hedge orders.
#[prost(string, optional, tag = "60")]
pub hedge_param: ::core::option::Option<::prost::alloc::string::String>,
/// The algorithm strategy. ArrivalPx – Arrival Price DarkIce – Dark Ice PctVol – Percentage of Volume Twap – TWAP (Time Weighted Average Price) Vwap – VWAP (Volume Weighted Average Price).
#[prost(string, optional, tag = "61")]
pub algo_strategy: ::core::option::Option<::prost::alloc::string::String>,
/// The list of parameters for the IB algorithm.
#[prost(map = "string, string", tag = "62")]
pub algo_params: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Identifies orders generated by algorithmic trading.
#[prost(string, optional, tag = "63")]
pub algo_id: ::core::option::Option<::prost::alloc::string::String>,
/// Hash map to define how the combination of orders should route.
#[prost(map = "string, string", tag = "64")]
pub smart_combo_routing_params: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Allows to retrieve the commissions and margin information without submitting an order.
#[prost(bool, optional, tag = "65")]
pub what_if: ::core::option::Option<bool>,
/// Specifies whether the order will be transmitted by TWS. If set to false, the order will be created at TWS but will not be sent. Users implementing directly from Protobuf should be aware that Transmit should be implicitly set to 'true' when placing orders to transmit an order.
#[prost(bool, optional, tag = "66")]
pub transmit: ::core::option::Option<bool>,
/// Overrides TWS price constraints. Precautionary constraints are defined on the TWS Presets page.
#[prost(bool, optional, tag = "67")]
pub override_percentage_constraints: ::core::option::Option<bool>,
/// For institutional customers only. Valid values are O (open) and C (close). Available for institutional clients to determine if this order is to open or close a position. When Action = "BUY" and OpenClose = "O" this will open a new position. When Action = "BUY" and OpenClose = "C" this will close and existing short position.
#[prost(string, optional, tag = "68")]
pub open_close: ::core::option::Option<::prost::alloc::string::String>,
/// The order's origin. Same as TWS "Origin" column. Identifies the type of customer from which the order originated. Valid values are:0 – Customer 1 – Firm.
#[prost(int32, optional, tag = "69")]
pub origin: ::core::option::Option<i32>,
/// For institutions only. Valid values are: 1 – Broker holds shares 2 – Shares come from elsewhere.
#[prost(int32, optional, tag = "70")]
pub short_sale_slot: ::core::option::Option<i32>,
/// For institutions only. Indicates the location where the shares to short come from. Used only when short sale slot is set to 2 (which means that the shares to short are held elsewhere and not with IB).
#[prost(string, optional, tag = "71")]
pub designated_location: ::core::option::Option<::prost::alloc::string::String>,
/// Only available with IB Execution-Only accounts with applicable securities. Mark order as exempt from short sale uptick rule.
#[prost(int32, optional, tag = "72")]
pub exempt_code: ::core::option::Option<i32>,
/// Indicates the firm which will settle the Delta Neutral trade. Institutions only.
#[prost(string, optional, tag = "73")]
pub delta_neutral_settling_firm: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Specifies the beneficiary of the Delta Neutral order.
#[prost(string, optional, tag = "74")]
pub delta_neutral_clearing_account: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Specifies where the clients want their shares to be cleared at. Must be specified by execution-only clients. Valid values are: IB.
#[prost(string, optional, tag = "75")]
pub delta_neutral_clearing_intent: ::core::option::Option<
::prost::alloc::string::String,
>,
/// The amount off the limit price allowed for discretionary orders.
#[prost(double, optional, tag = "76")]
pub discretionary_amt: ::core::option::Option<f64>,
/// Use to opt out of default SmartRouting for orders routed directly to ASX. This attribute defaults to false unless explicitly set to true.
#[prost(bool, optional, tag = "77")]
pub opt_out_smart_routing: ::core::option::Option<bool>,
/// The auction's starting price. For BOX orders only.
#[prost(double, optional, tag = "78")]
pub starting_price: ::core::option::Option<f64>,
/// The stock's reference price. The reference price is used for VOL orders to compute the limit price sent to an exchange (whether or not Continuous Update is selected).
#[prost(double, optional, tag = "79")]
pub stock_ref_price: ::core::option::Option<f64>,
/// The stock's Delta. For orders on BOX only.
#[prost(double, optional, tag = "80")]
pub delta: ::core::option::Option<f64>,
/// The lower value for the acceptable underlying stock price range. For price improvement option orders on BOX and VOL orders with dynamic management.
#[prost(double, optional, tag = "81")]
pub stock_range_lower: ::core::option::Option<f64>,
/// The upper value for the acceptable underlying stock price range. For price improvement option orders on BOX and VOL orders with dynamic management.
#[prost(double, optional, tag = "82")]
pub stock_range_upper: ::core::option::Option<f64>,
/// Orders routed to IBDARK are tagged as "post only" and are held in IB's order book.
#[prost(bool, optional, tag = "83")]
pub not_held: ::core::option::Option<bool>,
/// For internal use only. Use the default value XYZ.
#[prost(map = "string, string", tag = "84")]
pub order_misc_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// The Solicited field should be used for orders initiated or recommended by the broker or adviser that were approved by the client (by phone, email, chat, verbally, etc.) prior to entry. Please note that orders that the adviser or broker placed without specifically discussing with the client are discretionary orders, not solicited.
#[prost(bool, optional, tag = "85")]
pub solicited: ::core::option::Option<bool>,
/// Randomizes the order's size. Only for Volatility and Pegged to Volatility orders.
#[prost(bool, optional, tag = "86")]
pub randomize_size: ::core::option::Option<bool>,
/// Randomizes the order's price. Only for Volatility and Pegged to Volatility orders.
#[prost(bool, optional, tag = "87")]
pub randomize_price: ::core::option::Option<bool>,
/// Pegged-to-benchmark orders: this attribute will contain the conId of the contract against which the order will be pegged.
#[prost(int32, optional, tag = "88")]
pub reference_contract_id: ::core::option::Option<i32>,
/// Pegged-to-benchmark orders: amount by which the order's pegged price should move.
#[prost(double, optional, tag = "89")]
pub pegged_change_amount: ::core::option::Option<f64>,
/// Pegged-to-benchmark orders: indicates whether the order's pegged price should increase or decreases.
#[prost(bool, optional, tag = "90")]
pub is_pegged_change_amount_decrease: ::core::option::Option<bool>,
/// Pegged-to-benchmark orders: the amount the reference contract needs to move to adjust the pegged order.
#[prost(double, optional, tag = "91")]
pub reference_change_amount: ::core::option::Option<f64>,
/// Pegged-to-benchmark orders: the exchange identifer for the contract pegged to.
#[prost(string, optional, tag = "92")]
pub reference_exchange_id: ::core::option::Option<::prost::alloc::string::String>,
/// Adjusted Stop orders: the parent order will be adjusted to the given type when the adjusted trigger price is penetrated.
#[prost(string, optional, tag = "93")]
pub adjusted_order_type: ::core::option::Option<::prost::alloc::string::String>,
/// Adjusted Stop orders: specifies the trigger price to execute.
#[prost(double, optional, tag = "94")]
pub trigger_price: ::core::option::Option<f64>,
/// Adjusted Stop orders: specifies the stop price of the adjusted (STP) parent.
#[prost(double, optional, tag = "95")]
pub adjusted_stop_price: ::core::option::Option<f64>,
/// Adjusted Stop orders: specifies the stop limit price of the adjusted (STPL LMT) parent.
#[prost(double, optional, tag = "96")]
pub adjusted_stop_limit_price: ::core::option::Option<f64>,
/// Adjusted Stop orders: specifies the trailing amount of the adjusted (TRAIL) parent.
#[prost(double, optional, tag = "97")]
pub adjusted_trailing_amount: ::core::option::Option<f64>,
/// Adjusted Stop orders: specifies where the trailing unit is an amount (set to 0) or a percentage (set to 1).
#[prost(int32, optional, tag = "98")]
pub adjustable_trailing_unit: ::core::option::Option<i32>,
/// Adjusted Stop orders: specifies the price offset for the stop to move in increments.
#[prost(double, optional, tag = "99")]
pub lmt_price_offset: ::core::option::Option<f64>,
/// Conditions determining when the order will be activated or canceled.
#[prost(message, repeated, tag = "100")]
pub conditions: ::prost::alloc::vec::Vec<OrderCondition>,
/// Conditions can determine if an order should become active or canceled.
#[prost(bool, optional, tag = "101")]
pub conditions_cancel_order: ::core::option::Option<bool>,
/// Indicates whether or not conditions will also be valid outside Regular Trading Hours.
#[prost(bool, optional, tag = "102")]
pub conditions_ignore_rth: ::core::option::Option<bool>,
/// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
#[prost(string, optional, tag = "103")]
pub model_code: ::core::option::Option<::prost::alloc::string::String>,
/// Following CME Rule 576, the ExtOperator field will signify if the unique API operator at the time of trading for order management.
#[prost(string, optional, tag = "104")]
pub ext_operator: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "105")]
pub soft_dollar_tier: ::core::option::Option<SoftDollarTier>,
/// The native cash quantity.
#[prost(double, optional, tag = "106")]
pub cash_qty: ::core::option::Option<f64>,
/// Identifies a person as the responsible party for investment decisions within the firm. Orders covered by MiFID 2 (Markets in Financial Instruments Directive 2) must include either Mifid2DecisionMaker or Mifid2DecisionAlgo field (but not both).
#[prost(string, optional, tag = "107")]
pub mifid2_decision_maker: ::core::option::Option<::prost::alloc::string::String>,
/// Identifies the algorithm responsible for investment decisions within the firm. Orders covered under MiFID 2 must include either Mifid2DecisionMaker or Mifid2DecisionAlgo.
#[prost(string, optional, tag = "108")]
pub mifid2_decision_algo: ::core::option::Option<::prost::alloc::string::String>,
/// For MiFID 2 reporting; identifies a person as the responsible party for the execution of a transaction within the firm.
#[prost(string, optional, tag = "109")]
pub mifid2_execution_trader: ::core::option::Option<::prost::alloc::string::String>,
/// For MiFID 2 reporting; identifies the algorithm responsible for the execution of a transaction within the firm.
#[prost(string, optional, tag = "110")]
pub mifid2_execution_algo: ::core::option::Option<::prost::alloc::string::String>,
/// Don't use automatic pricing for hedge orders.
#[prost(bool, optional, tag = "111")]
pub dont_use_auto_price_for_hedge: ::core::option::Option<bool>,
/// Set to true to create tickets from API orders when TWS is used as an OMS.
#[prost(bool, optional, tag = "112")]
pub is_oms_container: ::core::option::Option<bool>,
/// Set to true to convert order of type 'Primary Peg' to 'D-Peg'.
#[prost(bool, optional, tag = "113")]
pub discretionary_up_to_limit_price: ::core::option::Option<bool>,
/// Specifies the date to auto cancel the order.
#[prost(string, optional, tag = "114")]
pub auto_cancel_date: ::core::option::Option<::prost::alloc::string::String>,
/// Specifies the initial order quantity to be filled.
#[prost(string, optional, tag = "115")]
pub filled_quantity: ::core::option::Option<::prost::alloc::string::String>,
/// Identifies the reference future conId.
#[prost(int32, optional, tag = "116")]
pub ref_futures_con_id: ::core::option::Option<i32>,
/// Cancels the parent order if child order was cancelled.
#[prost(bool, optional, tag = "117")]
pub auto_cancel_parent: ::core::option::Option<bool>,
/// Identifies the Shareholder.
#[prost(string, optional, tag = "118")]
pub shareholder: ::core::option::Option<::prost::alloc::string::String>,
/// Used to specify "imbalance only open orders" or "imbalance only closing orders".
#[prost(bool, optional, tag = "119")]
pub imbalance_only: ::core::option::Option<bool>,
/// Routes market order to Best Bid Offer.
#[prost(int32, optional, tag = "120")]
pub route_marketable_to_bbo: ::core::option::Option<i32>,
/// Parent's permanent order Id.
#[prost(int64, optional, tag = "121")]
pub parent_perm_id: ::core::option::Option<i64>,
/// Specifies wether to use Price Management Algo. CTCI users only.
#[prost(int32, optional, tag = "122")]
pub use_price_mgmt_algo: ::core::option::Option<i32>,
/// Specifies the number of seconds the order should remain active. For GTD orders only. Users that would prefer to specify an exact date should user the "GoodTillDate" parameter instead. Both values cannot be specified at the same time.
#[prost(int32, optional, tag = "123")]
pub duration: ::core::option::Option<i32>,
/// List your order on the IBKR Alternative Trading System.
#[prost(int32, optional, tag = "124")]
pub post_to_ats: ::core::option::Option<i32>,
/// Accepts a string with parameters obtained from advancedOrderRejectJson.
#[prost(string, optional, tag = "125")]
pub advanced_error_override: ::core::option::Option<::prost::alloc::string::String>,
/// Used by brokers and advisors when manually entering an order request. Format should be "YYYYMMDD-HH:mm:ss" using UTC as the timezone value.
#[prost(string, optional, tag = "126")]
pub manual_order_time: ::core::option::Option<::prost::alloc::string::String>,
/// Defines the minimum trade quantity to fill. For IBKRATS orders.
#[prost(int32, optional, tag = "127")]
pub min_trade_qty: ::core::option::Option<i32>,
/// Defines the minimum size to compete. For IBKRATS orders.
#[prost(int32, optional, tag = "128")]
pub min_compete_size: ::core::option::Option<i32>,
/// Specifies the offset Off The Midpoint that will be applied to the order. For IBKRATS orders.
#[prost(double, optional, tag = "129")]
pub compete_against_best_offset: ::core::option::Option<f64>,
/// This offset is applied when the spread is an even number of cents wide. This offset must be in whole-penny increments or zero. For IBKRATS orders.
#[prost(double, optional, tag = "130")]
pub mid_offset_at_whole: ::core::option::Option<f64>,
/// This offset is applied when the spread is an odd number of cents wide. This offset must be in half-penny increments. For IBKRATS orders.
#[prost(double, optional, tag = "131")]
pub mid_offset_at_half: ::core::option::Option<f64>,
/// Required for Nondisclosed Omnibus Accounts. A unique identifier for each account within the Omnibus structure to signify the account holder being traded. Best practice (Not Required): clients should look to hash this value, using something along the lines of 5 digits of SHA1 of the account number. This should not be implemented for non-omnibus accounts.
#[prost(string, optional, tag = "132")]
pub customer_account: ::core::option::Option<::prost::alloc::string::String>,
/// Identify the order as a full time, professional trader.
#[prost(bool, optional, tag = "133")]
pub professional_customer: ::core::option::Option<bool>,
/// Defines the interest acrrual of the bond.
#[prost(string, optional, tag = "134")]
pub bond_accrued_interest: ::core::option::Option<::prost::alloc::string::String>,
/// Specify if the order should include overnight trading or not. False (no Overnight) is set by default.
#[prost(bool, optional, tag = "135")]
pub include_overnight: ::core::option::Option<bool>,
/// Following CME Rule 576, the ManualOrderIndicator field will signify if an order is manual (1) or automated (0).
#[prost(int32, optional, tag = "136")]
pub manual_order_indicator: ::core::option::Option<i32>,
/// Define the user that submitted the order.
#[prost(string, optional, tag = "137")]
pub submitter: ::core::option::Option<::prost::alloc::string::String>,
/// Determines if the order is Active (False) or Deactivated (True). Orders that are deactivated are not submitted and will not execute, though they can be reviewed and transmitted via API, Trader Workstation, or Client Portal. This is unique from the Transmit field as orders submitted as Transmit=False will not leave the current TWS instance, and will be erased upon logout. Deactivated orders will persist internally at Interactive Brokers.
#[prost(bool, optional, tag = "138")]
pub deactivate: ::core::option::Option<bool>,
/// If set to true, when there is non-displayed liquidity at the same price point, the order price is adjusted low (for a buy) or higher (for a sell) by one penny to avoid taking that liquidity. If the order comes in at a price higher (for a buy) or lower (for a sell) than an order already sitting on the book, it becomes an IOC (immediate-or-cancel) order at the better price.
#[prost(bool, optional, tag = "139")]
pub post_only: ::core::option::Option<bool>,
/// Set to true to allow orders to participate in the pre-open session from 4:00 - 9:30 am.
#[prost(bool, optional, tag = "140")]
pub allow_pre_open: ::core::option::Option<bool>,
/// Set to true ignore the opening auction.
#[prost(bool, optional, tag = "141")]
pub ignore_open_auction: ::core::option::Option<bool>,
/// Set to true to seek a better price than that submitted with the order.
#[prost(int32, optional, tag = "142")]
pub seek_price_improvement: ::core::option::Option<i32>,
/// {0: Full order check, 1: Check margin requirements of the order, 2: Internal use only., 3: Projected destination for auto-routing. Internal use only., 4: Disregards trading hours. Internal use only., 7: Records display of Japan mutual fund prospectus. Internal use only., 8: Commission-only calculation. Internal use only. }.
#[prost(int32, optional, tag = "143")]
pub what_if_type: ::core::option::Option<i32>,
/// hedgeMaxSize (also referred to as "Max Hedging Size") is a user-supplied parameter that caps the maximum number of shares that can be shorted in a beta hedge child order. It provides an upper bound for risk and credit assessment purposes. Applied only to beta hedge orders (sell side only) for stocks in IB- cleared accounts.
#[prost(int32, optional, tag = "144")]
pub hedge_max_size: ::core::option::Option<i32>,
/// Declares that order conditions should be followed when includeOvernight=True.
#[prost(bool, optional, tag = "145")]
pub conditions_include_overnight: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderAllocation {
/// References the Account ID, i.e. U1234567, being allocated to.
#[prost(string, optional, tag = "1")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// References the current position of the account being allocated to.
#[prost(string, optional, tag = "2")]
pub position: ::core::option::Option<::prost::alloc::string::String>,
/// States the full position increase intended by the current trade.
#[prost(string, optional, tag = "3")]
pub position_desired: ::core::option::Option<::prost::alloc::string::String>,
/// Size of the position once the order has been allocated.
#[prost(string, optional, tag = "4")]
pub position_after: ::core::option::Option<::prost::alloc::string::String>,
/// Reference the quantity to increase by based on allocation.
#[prost(string, optional, tag = "5")]
pub desired_alloc_qty: ::core::option::Option<::prost::alloc::string::String>,
/// References the maximum allowed quantity increase.
#[prost(string, optional, tag = "6")]
pub allowed_alloc_qty: ::core::option::Option<::prost::alloc::string::String>,
/// Denotes whether the order is a monetary allocation (true) or whole share allocation (false).
#[prost(bool, optional, tag = "7")]
pub is_monetary: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderState {
/// The order's current status.
#[prost(string, optional, tag = "1")]
pub status: ::core::option::Option<::prost::alloc::string::String>,
/// The account's current initial margin.
#[prost(double, optional, tag = "2")]
pub init_margin_before: ::core::option::Option<f64>,
/// The account's current maintenance margin.
#[prost(double, optional, tag = "3")]
pub maint_margin_before: ::core::option::Option<f64>,
/// The account's current equity with loan.
#[prost(double, optional, tag = "4")]
pub equity_with_loan_before: ::core::option::Option<f64>,
/// The change of the account's initial margin.
#[prost(double, optional, tag = "5")]
pub init_margin_change: ::core::option::Option<f64>,
/// The change of the account's maintenance margin.
#[prost(double, optional, tag = "6")]
pub maint_margin_change: ::core::option::Option<f64>,
/// The change of the account's equity with loan.
#[prost(double, optional, tag = "7")]
pub equity_with_loan_change: ::core::option::Option<f64>,
/// The order's impact on the account's initial margin.
#[prost(double, optional, tag = "8")]
pub init_margin_after: ::core::option::Option<f64>,
/// The order's impact on the account's maintenance margin.
#[prost(double, optional, tag = "9")]
pub maint_margin_after: ::core::option::Option<f64>,
/// Shows the impact the order would have on the account's equity with loan.
#[prost(double, optional, tag = "10")]
pub equity_with_loan_after: ::core::option::Option<f64>,
/// Additional order cost for fees and commissions.
#[prost(double, optional, tag = "11")]
pub commission_and_fees: ::core::option::Option<f64>,
/// Lowest possible commission and fee value for the order.
#[prost(double, optional, tag = "12")]
pub min_commission_and_fees: ::core::option::Option<f64>,
/// Highest possible commission and fee value for the order.
#[prost(double, optional, tag = "13")]
pub max_commission_and_fees: ::core::option::Option<f64>,
/// Type of currency representing commissions and fee values.
#[prost(string, optional, tag = "14")]
pub commission_and_fees_currency: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Type of currency representing margin values.
#[prost(string, optional, tag = "15")]
pub margin_currency: ::core::option::Option<::prost::alloc::string::String>,
/// The account's expected initial margin outside of regular trading hours.
#[prost(double, optional, tag = "16")]
pub init_margin_before_outside_rth: ::core::option::Option<f64>,
/// The account's expected maintenance margin outside of regular trading hours.
#[prost(double, optional, tag = "17")]
pub maint_margin_before_outside_rth: ::core::option::Option<f64>,
/// The account's expected equity with loan outside of regular trading hours.
#[prost(double, optional, tag = "18")]
pub equity_with_loan_before_outside_rth: ::core::option::Option<f64>,
/// The expected change of the account's initial margin outside of regular trading hours.
#[prost(double, optional, tag = "19")]
pub init_margin_change_outside_rth: ::core::option::Option<f64>,
/// The expected change of the account's maintenance margin outside of regular trading hours.
#[prost(double, optional, tag = "20")]
pub maint_margin_change_outside_rth: ::core::option::Option<f64>,
/// The expected change of the account's equity with loan outside of regular trading hours.
#[prost(double, optional, tag = "21")]
pub equity_with_loan_change_outside_rth: ::core::option::Option<f64>,
/// The order's expected impact on the account's initial margin outside of regular trading hours.
#[prost(double, optional, tag = "22")]
pub init_margin_after_outside_rth: ::core::option::Option<f64>,
/// The order's expected impact on the account's maintenance margin outside of regular trading hours.
#[prost(double, optional, tag = "23")]
pub maint_margin_after_outside_rth: ::core::option::Option<f64>,
/// Shows the expected impact the order would have on the account's equity with loan outside of regular trading hours.
#[prost(double, optional, tag = "24")]
pub equity_with_loan_after_outside_rth: ::core::option::Option<f64>,
/// Suggested size of the order based on account balances.
#[prost(string, optional, tag = "25")]
pub suggested_size: ::core::option::Option<::prost::alloc::string::String>,
/// Audit trail details for why the order was rejected.
#[prost(string, optional, tag = "26")]
pub reject_reason: ::core::option::Option<::prost::alloc::string::String>,
/// Proto object containing order allocation behaviors.
#[prost(message, repeated, tag = "27")]
pub order_allocations: ::prost::alloc::vec::Vec<OrderAllocation>,
/// If the order is warranted, a descriptive message will be provided.
#[prost(string, optional, tag = "28")]
pub warning_text: ::core::option::Option<::prost::alloc::string::String>,
/// Time when the order was completed.
#[prost(string, optional, tag = "29")]
pub completed_time: ::core::option::Option<::prost::alloc::string::String>,
/// The current status of the order. Supports "Inactive", "PendingSubmit", "PreSubmitted", "Submitted", "Filled", "PendingCancel", "PreCancelled", "Cancelled", "WarnState".
#[prost(string, optional, tag = "30")]
pub completed_status: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenOrder {
/// The API client's order id.
#[prost(int32, optional, tag = "1")]
pub order_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// The currently active Order.
#[prost(message, optional, tag = "3")]
pub order: ::core::option::Option<Order>,
/// The order's OrderState.
#[prost(message, optional, tag = "4")]
pub order_state: ::core::option::Option<OrderState>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScannerSubscriptionRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// A scanner subscription objection containing all details required to request scanner data.
#[prost(message, optional, tag = "2")]
pub scanner_subscription: ::core::option::Option<ScannerSubscription>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsBulletin {
/// Unique identifier to track a given news article.
#[prost(int32, optional, tag = "1")]
pub news_msg_id: ::core::option::Option<i32>,
/// Bulletin type to define a given article.
#[prost(int32, optional, tag = "2")]
pub news_msg_type: ::core::option::Option<i32>,
/// Content of a given news article.
#[prost(string, optional, tag = "3")]
pub news_message: ::core::option::Option<::prost::alloc::string::String>,
/// Exchange reporting a bulletin.
#[prost(string, optional, tag = "4")]
pub originating_exch: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelScannerSubscription {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IneligibilityReason {
/// The order's unique identifier. If a new order is placed with an order ID less than or equal to the order ID of a previous order an error will occur.
#[prost(string, optional, tag = "1")]
pub id: ::core::option::Option<::prost::alloc::string::String>,
/// Description of the contract.
#[prost(string, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsProvider {
/// News provider code based on requested data.
#[prost(string, optional, tag = "1")]
pub provider_code: ::core::option::Option<::prost::alloc::string::String>,
/// Cites the source producing the news article.
#[prost(string, optional, tag = "2")]
pub provider_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarketRuleRequest {
/// Market Rule ID requested.
#[prost(int32, optional, tag = "1")]
pub market_rule_id: ::core::option::Option<i32>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelNewsBulletins {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelHistogramData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelPnL {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickString {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Type of data the tick represents.
#[prost(int32, optional, tag = "2")]
pub tick_type: ::core::option::Option<i32>,
/// Representative information for a given Key.
#[prost(string, optional, tag = "3")]
pub value: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepth {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Market depth price attributes.
#[prost(message, optional, tag = "2")]
pub market_depth_data: ::core::option::Option<MarketDepthData>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepthL2 {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Market depth price attributes.
#[prost(message, optional, tag = "2")]
pub market_depth_data: ::core::option::Option<MarketDepthData>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountDataEnd {
/// The account identifier.
#[prost(string, optional, tag = "1")]
pub account_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrderStatus {
/// The API client's order id.
#[prost(int32, optional, tag = "1")]
pub order_id: ::core::option::Option<i32>,
/// Current status of the order.
#[prost(string, optional, tag = "2")]
pub status: ::core::option::Option<::prost::alloc::string::String>,
/// Number of shares filled.
#[prost(string, optional, tag = "3")]
pub filled: ::core::option::Option<::prost::alloc::string::String>,
/// The remaining shares of the order.
#[prost(string, optional, tag = "4")]
pub remaining: ::core::option::Option<::prost::alloc::string::String>,
/// Average execution price of shares in the order.
#[prost(double, optional, tag = "5")]
pub avg_fill_price: ::core::option::Option<f64>,
/// The Host order identifier.
#[prost(int64, optional, tag = "6")]
pub perm_id: ::core::option::Option<i64>,
/// The order ID of the parent order, used for bracket and auto trailing stop orders.
#[prost(int32, optional, tag = "7")]
pub parent_id: ::core::option::Option<i32>,
/// Price at which the last positions were filled.
#[prost(double, optional, tag = "8")]
pub last_fill_price: ::core::option::Option<f64>,
/// The API client id which placed the order.
#[prost(int32, optional, tag = "9")]
pub client_id: ::core::option::Option<i32>,
/// Indication of why an order was held.
#[prost(string, optional, tag = "10")]
pub why_held: ::core::option::Option<::prost::alloc::string::String>,
/// If an order has been capped, this indicates the current capped price.
#[prost(double, optional, tag = "11")]
pub mkt_cap_price: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SymbolSamples {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Object containing a Contract and a list of supported Derivative Security Types available.
#[prost(message, repeated, tag = "2")]
pub contract_descriptions: ::prost::alloc::vec::Vec<ContractDescription>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelPnLSingle {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelContractData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelAccountSummary {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelCalculateOptionPrice {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SecDefOptParameterEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HeadTimestamp {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Value identifying earliest data date.
#[prost(string, optional, tag = "2")]
pub head_timestamp: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountUpdateTime {
/// Epoch timestamp of the response.
#[prost(string, optional, tag = "1")]
pub time_stamp: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompletedOrder {
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "1")]
pub contract: ::core::option::Option<Contract>,
/// The [Order](<https://www.interactivebrokers.com/docs/tws-api/ref/order>) details of the completed orders.
#[prost(message, optional, tag = "2")]
pub order: ::core::option::Option<Order>,
/// The current [Order State](<https://www.interactivebrokers.com/docs/tws-api/ref/order-state>) details of the Order.
#[prost(message, optional, tag = "3")]
pub order_state: ::core::option::Option<OrderState>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MessageConfig {
/// The order's unique identifier. If a new order is placed with an order ID less than or equal to the order ID of a previous order an error will occur.
#[prost(int32, optional, tag = "1")]
pub id: ::core::option::Option<i32>,
/// Message headline or summary.
#[prost(string, optional, tag = "2")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
/// The news bulletin context.
#[prost(string, optional, tag = "3")]
pub message: ::core::option::Option<::prost::alloc::string::String>,
/// Default action for handling the message. Supports "Yes", "No", and "Hidden".
#[prost(string, optional, tag = "4")]
pub default_action: ::core::option::Option<::prost::alloc::string::String>,
/// Declare that the message should be enabled to warn based on given actions.
#[prost(bool, optional, tag = "5")]
pub enabled: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CurrentTime {
/// 10 digit timestamp indicating current Epoch timestamp with second precision.
#[prost(int64, optional, tag = "1")]
pub current_time: ::core::option::Option<i64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FaRequest {
/// Receive the faDataType value specified in the requestFA. See [FA Data Types](#fa-data-types).
#[prost(int32, optional, tag = "1")]
pub fa_data_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserInfo {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Company identifier for white branded integrations.
#[prost(string, optional, tag = "2")]
pub white_branding_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickReqParams {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Minimum number of ticks returned.
#[prost(string, optional, tag = "2")]
pub min_tick: ::core::option::Option<::prost::alloc::string::String>,
/// Identifier for the exchange with the best bid and offer.
#[prost(string, optional, tag = "3")]
pub bbo_exchange: ::core::option::Option<::prost::alloc::string::String>,
/// Market data permissions to retrieve instrument data.
#[prost(int32, optional, tag = "4")]
pub snapshot_permissions: ::core::option::Option<i32>,
/// The decimal precision for supported prices.
#[prost(string, optional, tag = "5")]
pub last_price_precision: ::core::option::Option<::prost::alloc::string::String>,
/// The decimal precision supported for order sizes.
#[prost(string, optional, tag = "6")]
pub last_size_precision: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReceiveFa {
/// Receive the faDataType value specified in the requestFA. See [FA Data Types](#fa-data-types).
#[prost(int32, optional, tag = "1")]
pub fa_data_type: ::core::option::Option<i32>,
/// String Representation of an XML document.
#[prost(string, optional, tag = "2")]
pub xml: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LockAndExitConfig {
/// Define the 12-hour time to logoff or restart. Formatted as "HH:MM".
#[prost(string, optional, tag = "1")]
pub auto_logoff_time: ::core::option::Option<::prost::alloc::string::String>,
/// Declare "AM" or "PM" for your logout time.
#[prost(string, optional, tag = "2")]
pub auto_logoff_period: ::core::option::Option<::prost::alloc::string::String>,
/// Declare if the system should "logoff" or "restart" at the defined time.
#[prost(string, optional, tag = "3")]
pub auto_logoff_type: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigResponse {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// API Settings configuration for the "Lock and Exit" Global Configuration page.
#[prost(message, optional, tag = "2")]
pub lock_and_exit: ::core::option::Option<LockAndExitConfig>,
/// Complementary messages identifying settings.
#[prost(message, repeated, tag = "3")]
pub messages: ::prost::alloc::vec::Vec<MessageConfig>,
/// Host object of all Global Configuration -> API sub-menu settings.
#[prost(message, optional, tag = "4")]
pub api: ::core::option::Option<ApiConfig>,
/// Order configuration settings from the Global Configuration.
#[prost(message, optional, tag = "5")]
pub orders: ::core::option::Option<OrdersConfig>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelWshMetaData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickNews {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Epoch timestamp of the response.
#[prost(int64, optional, tag = "2")]
pub timestamp: ::core::option::Option<i64>,
/// News provider code based on requested data.
#[prost(string, optional, tag = "3")]
pub provider_code: ::core::option::Option<::prost::alloc::string::String>,
/// Identifier used to track the news article. See [EClient.reqNewsArticle](/tws-api/doc/news/news-articles/request-news-articles) for more details.
#[prost(string, optional, tag = "4")]
pub article_id: ::core::option::Option<::prost::alloc::string::String>,
/// Headline of the provided news article.
#[prost(string, optional, tag = "5")]
pub headline: ::core::option::Option<::prost::alloc::string::String>,
/// Returns any additional data available about the article.
#[prost(string, optional, tag = "6")]
pub extra_data: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RealTimeBarsRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Currently being ignored.
#[prost(int32, optional, tag = "3")]
pub bar_size: ::core::option::Option<i32>,
/// Data source type.
#[prost(string, optional, tag = "4")]
pub what_to_show: ::core::option::Option<::prost::alloc::string::String>,
/// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
#[prost(bool, optional, tag = "5")]
pub use_rth: ::core::option::Option<bool>,
/// Internal use. Flag special behavior or properties for real time bar rquests.
#[prost(map = "string, string", tag = "6")]
pub real_time_bars_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WshEventDataRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The unique IB contract identifier.
#[prost(int32, optional, tag = "2")]
pub con_id: ::core::option::Option<i32>,
/// The filter criteria used to determine which execution reports are returned.
#[prost(string, optional, tag = "3")]
pub filter: ::core::option::Option<::prost::alloc::string::String>,
/// Automatically fill in values from your watchlist.
#[prost(bool, optional, tag = "4")]
pub fill_watchlist: ::core::option::Option<bool>,
/// Automatically fill in values from your portfolio.
#[prost(bool, optional, tag = "5")]
pub fill_portfolio: ::core::option::Option<bool>,
/// Automatically fill in competitor values of existing positions.
#[prost(bool, optional, tag = "6")]
pub fill_competitors: ::core::option::Option<bool>,
/// The earliest starting point of the request. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
#[prost(string, optional, tag = "7")]
pub start_date: ::core::option::Option<::prost::alloc::string::String>,
/// Specify the end date of the event requests. Formatted as "YYYYMMDD".
#[prost(string, optional, tag = "8")]
pub end_date: ::core::option::Option<::prost::alloc::string::String>,
/// Maximum number of WSH Events that may be returned.
#[prost(int32, optional, tag = "9")]
pub total_limit: ::core::option::Option<i32>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionEnd {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Execution {
/// The API client's order Id. May not be unique to an account.
#[prost(int32, optional, tag = "1")]
pub order_id: ::core::option::Option<i32>,
/// The execution's identifier. Each partial fill has a separate ExecId. A correction is indicated by an ExecId which differs from a previous ExecId in only the digits after the final period.
#[prost(string, optional, tag = "2")]
pub exec_id: ::core::option::Option<::prost::alloc::string::String>,
/// The execution's server time.
#[prost(string, optional, tag = "3")]
pub time: ::core::option::Option<::prost::alloc::string::String>,
/// The account to which the order was allocated.
#[prost(string, optional, tag = "4")]
pub acct_number: ::core::option::Option<::prost::alloc::string::String>,
/// The exchange where the execution took place.
#[prost(string, optional, tag = "5")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// Specifies if the transaction was buy or sale BOT for bought.
#[prost(string, optional, tag = "6")]
pub side: ::core::option::Option<::prost::alloc::string::String>,
/// The number of shares filled.
#[prost(string, optional, tag = "7")]
pub shares: ::core::option::Option<::prost::alloc::string::String>,
/// The order's execution price excluding commissions.
#[prost(double, optional, tag = "8")]
pub price: ::core::option::Option<f64>,
/// The TWS order identifier. The PermId can be 0 for trades originating outside IB.
#[prost(int64, optional, tag = "9")]
pub perm_id: ::core::option::Option<i64>,
/// The API client identifier which placed the order which originated this execution.
#[prost(int32, optional, tag = "10")]
pub client_id: ::core::option::Option<i32>,
/// Indicates the order was triggered as an IB Liquidation.
#[prost(bool, optional, tag = "11")]
pub is_liquidation: ::core::option::Option<bool>,
/// Cumulative quantity. Used in regular trades.
#[prost(string, optional, tag = "12")]
pub cum_qty: ::core::option::Option<::prost::alloc::string::String>,
/// Average price. Used in regular trades.
#[prost(double, optional, tag = "13")]
pub avg_price: ::core::option::Option<f64>,
/// The OrderRef is a user-customizable string that can be set from the API or TWS and will be associated with an order for its lifetime.
#[prost(string, optional, tag = "14")]
pub order_ref: ::core::option::Option<::prost::alloc::string::String>,
/// The Economic Value Rule name and the respective optional argument. The two values should be separated by a colon.
#[prost(string, optional, tag = "15")]
pub ev_rule: ::core::option::Option<::prost::alloc::string::String>,
/// Tells you approximately how much the market value of a contract would change if the price were to change by 1. It cannot be used to get market value by multiplying the price by the approximate multiplier.
#[prost(double, optional, tag = "16")]
pub ev_multiplier: ::core::option::Option<f64>,
/// Identifier of the financial advisor's model.
#[prost(string, optional, tag = "17")]
pub model_code: ::core::option::Option<::prost::alloc::string::String>,
/// The liquidity type of the execution.
#[prost(int32, optional, tag = "18")]
pub last_liquidity: ::core::option::Option<i32>,
/// Indicates the price the order executed as may be changed.
#[prost(bool, optional, tag = "19")]
pub is_price_revision_pending: ::core::option::Option<bool>,
/// Username that placed the executing order.
#[prost(string, optional, tag = "20")]
pub submitter: ::core::option::Option<::prost::alloc::string::String>,
/// Flags the type of exercise that traded the order.
#[prost(int32, optional, tag = "21")]
pub opt_exercise_or_lapse_type: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistogramDataRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
#[prost(bool, optional, tag = "3")]
pub use_rth: ::core::option::Option<bool>,
/// Range of time covered by historgram.
#[prost(string, optional, tag = "4")]
pub time_period: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractDetails {
/// The market name for this product.
#[prost(string, optional, tag = "1")]
pub market_name: ::core::option::Option<::prost::alloc::string::String>,
/// The minimum allowed price variation. Note that many securities vary their minimum tick size according to their price. This value will only show the smallest of the different minimum tick sizes regardless of the product's price. Full information about the minimum increment price structure can be obtained with the reqMarketRule function or the IB Contract and Security Search site.
#[prost(string, optional, tag = "2")]
pub min_tick: ::core::option::Option<::prost::alloc::string::String>,
/// Supported order types for this product.
#[prost(string, optional, tag = "3")]
pub order_types: ::core::option::Option<::prost::alloc::string::String>,
/// Valid exchange fields when placing an order for this contract.
#[prost(string, optional, tag = "4")]
pub valid_exchanges: ::core::option::Option<::prost::alloc::string::String>,
/// Price scaling indicating distinction of the market data or order prices against the traded currency. As an example, SHEL@LSE maintains a currency in Great British Pounds; however, quotes are displayed in Pence, so the displayed price is 100x (magnified) what an order is submitted as.
#[prost(int32, optional, tag = "5")]
pub price_magnifier: ::core::option::Option<i32>,
/// Underlying contract identifier for our derivative contract.
#[prost(int32, optional, tag = "6")]
pub under_con_id: ::core::option::Option<i32>,
/// Descriptive name of the product.
#[prost(string, optional, tag = "7")]
pub long_name: ::core::option::Option<::prost::alloc::string::String>,
/// The contract month of the underlying for a Future contract.
#[prost(string, optional, tag = "8")]
pub contract_month: ::core::option::Option<::prost::alloc::string::String>,
/// The industry classification of the underlying/product.
#[prost(string, optional, tag = "9")]
pub industry: ::core::option::Option<::prost::alloc::string::String>,
/// The industry category of the underlying.
#[prost(string, optional, tag = "10")]
pub category: ::core::option::Option<::prost::alloc::string::String>,
/// The industry subcategory of the underlying.
#[prost(string, optional, tag = "11")]
pub subcategory: ::core::option::Option<::prost::alloc::string::String>,
/// The time zone for the trading hours of the product.
#[prost(string, optional, tag = "12")]
pub time_zone_id: ::core::option::Option<::prost::alloc::string::String>,
/// The trading hours of the product. This value will contain the trading hours of the current day as well as the next's.
#[prost(string, optional, tag = "13")]
pub trading_hours: ::core::option::Option<::prost::alloc::string::String>,
/// The liquid hours of the product. This value will contain the liquid hours (regular trading hours) of the contract on the specified exchange.
#[prost(string, optional, tag = "14")]
pub liquid_hours: ::core::option::Option<::prost::alloc::string::String>,
/// Contains the Economic Value Rule name and the respective optional argument. The two values should be separated by a colon.
#[prost(string, optional, tag = "15")]
pub ev_rule: ::core::option::Option<::prost::alloc::string::String>,
/// Tells you approximately how much the market value of a contract would change if the price were to change by 1. It cannot be used to get market value by multiplying the price by the approximate multiplier.
#[prost(double, optional, tag = "16")]
pub ev_multiplier: ::core::option::Option<f64>,
/// A list of contract identifiers that the customer is allowed to view. CUSIP/ISIN/etc. For US stocks.
#[prost(map = "string, string", tag = "17")]
pub sec_id_list: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
/// Aggregated group Indicates the smart-routing group to which a contract belongs. contracts which cannot be smart-routed have aggGroup = -1.
#[prost(int32, optional, tag = "18")]
pub agg_group: ::core::option::Option<i32>,
/// Underlying contract's symbol for our derivative contract.
#[prost(string, optional, tag = "19")]
pub under_symbol: ::core::option::Option<::prost::alloc::string::String>,
/// Underlying contract's security type (STK, IND) for our derivative contract.
#[prost(string, optional, tag = "20")]
pub under_sec_type: ::core::option::Option<::prost::alloc::string::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.
#[prost(string, optional, tag = "21")]
pub market_rule_ids: ::core::option::Option<::prost::alloc::string::String>,
/// Expiration date for the contract in contrast to the last trading date.
#[prost(string, optional, tag = "22")]
pub real_expiration_date: ::core::option::Option<::prost::alloc::string::String>,
/// Stock type: Common, CORP, ADR, ETF, ETN, REIT, CEF, ETMF, EFN.
#[prost(string, optional, tag = "23")]
pub stock_type: ::core::option::Option<::prost::alloc::string::String>,
/// Order's minimal size.
#[prost(string, optional, tag = "24")]
pub min_size: ::core::option::Option<::prost::alloc::string::String>,
/// Order's size increment.
#[prost(string, optional, tag = "25")]
pub size_increment: ::core::option::Option<::prost::alloc::string::String>,
/// Order's suggested size increment.
#[prost(string, optional, tag = "26")]
pub suggested_size_increment: ::core::option::Option<::prost::alloc::string::String>,
/// Fund's name.
#[prost(string, optional, tag = "27")]
pub fund_name: ::core::option::Option<::prost::alloc::string::String>,
/// Fund's family.
#[prost(string, optional, tag = "28")]
pub fund_family: ::core::option::Option<::prost::alloc::string::String>,
/// Fund's type.
#[prost(string, optional, tag = "29")]
pub fund_type: ::core::option::Option<::prost::alloc::string::String>,
/// Fund's front load.
#[prost(string, optional, tag = "30")]
pub fund_front_load: ::core::option::Option<::prost::alloc::string::String>,
/// Fund's back load.
#[prost(string, optional, tag = "31")]
pub fund_back_load: ::core::option::Option<::prost::alloc::string::String>,
/// Fund's back load time interval.
#[prost(string, optional, tag = "32")]
pub fund_back_load_time_interval: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Fund's management fee.
#[prost(string, optional, tag = "33")]
pub fund_management_fee: ::core::option::Option<::prost::alloc::string::String>,
/// Fund closed flag.
#[prost(bool, optional, tag = "34")]
pub fund_closed: ::core::option::Option<bool>,
/// Fund closed for new investors flag.
#[prost(bool, optional, tag = "35")]
pub fund_closed_for_new_investors: ::core::option::Option<bool>,
/// Fund closed for new money flag.
#[prost(bool, optional, tag = "36")]
pub fund_closed_for_new_money: ::core::option::Option<bool>,
/// Fund's notify amount.
#[prost(string, optional, tag = "37")]
pub fund_notify_amount: ::core::option::Option<::prost::alloc::string::String>,
/// Fund's minimum initial purchase.
#[prost(string, optional, tag = "38")]
pub fund_minimum_initial_purchase: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Minimum purchase for additional fund contracts.
#[prost(string, optional, tag = "39")]
pub fund_minimum_subsequent_purchase: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Home state for the fund's Blue Sky filing.
#[prost(string, optional, tag = "40")]
pub fund_blue_sky_states: ::core::option::Option<::prost::alloc::string::String>,
/// Home territory for the fund's Blue Sky filing.
#[prost(string, optional, tag = "41")]
pub fund_blue_sky_territories: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Fund's distribution policy indicator.
#[prost(string, optional, tag = "42")]
pub fund_distribution_policy_indicator: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Fund's asset type.
#[prost(string, optional, tag = "43")]
pub fund_asset_type: ::core::option::Option<::prost::alloc::string::String>,
/// The nine-character bond CUSIP. For Bonds only. Receiving CUSIPs requires a CUSIP market data subscription.
#[prost(string, optional, tag = "44")]
pub cusip: ::core::option::Option<::prost::alloc::string::String>,
/// The date the bond was issued. This field is currently not available from the TWS API. For Bonds only. Not currently implemented due to bond market data restrictions.
#[prost(string, optional, tag = "45")]
pub issue_date: ::core::option::Option<::prost::alloc::string::String>,
/// Identifies the credit rating of the issuer. This field is not currently available from the TWS API. For Bonds only. A higher credit rating generally indicates a less risky investment. Bond ratings are from Moody's and S&P respectively. Not currently implemented due to bond market data restrictions.
#[prost(string, optional, tag = "46")]
pub ratings: ::core::option::Option<::prost::alloc::string::String>,
/// The type of bond.
#[prost(string, optional, tag = "47")]
pub bond_type: ::core::option::Option<::prost::alloc::string::String>,
/// The interest rate used to calculate the amount you will receive in interest payments over the course of the year. This field is currently not available from the TWS API. For Bonds only.
#[prost(double, optional, tag = "48")]
pub coupon: ::core::option::Option<f64>,
/// The type of bond coupon. This field is currently not available from the TWS API. For Bonds only.
#[prost(string, optional, tag = "49")]
pub coupon_type: ::core::option::Option<::prost::alloc::string::String>,
/// Indicates a debt instrument that can be converted into stock (equity) at a predetermined time at the discretion of the bondholder.
#[prost(bool, optional, tag = "50")]
pub convertible: ::core::option::Option<bool>,
/// Indicates a debt security that lets the issuer buy back or redeem the principal before the scheduled maturity date.
#[prost(bool, optional, tag = "51")]
pub callable: ::core::option::Option<bool>,
/// Indicates a debt security that lets the bondholder require the issuer to repurchase the bond at specified dates before its maturity.
#[prost(bool, optional, tag = "52")]
pub puttable: ::core::option::Option<bool>,
/// A description string containing further descriptive information about the bond. For Bonds only.
#[prost(string, optional, tag = "53")]
pub desc_append: ::core::option::Option<::prost::alloc::string::String>,
/// Only if bond has embedded options. This field is currently not available from the TWS API. Refers to callable bonds and puttable bonds. Available in TWS description window for bonds.
#[prost(string, optional, tag = "54")]
pub next_option_date: ::core::option::Option<::prost::alloc::string::String>,
/// Type of embedded option. This field is currently not available from the TWS API. Only if bond has embedded options.
#[prost(string, optional, tag = "55")]
pub next_option_type: ::core::option::Option<::prost::alloc::string::String>,
/// Only if bond has embedded options. This field is currently not available from the TWS API. For Bonds only.
#[prost(bool, optional, tag = "56")]
pub next_option_partial: ::core::option::Option<bool>,
/// Additional context regarding bond behavior.
#[prost(string, optional, tag = "57")]
pub bond_notes: ::core::option::Option<::prost::alloc::string::String>,
/// List of details why the account cannot trade the given security.
#[prost(message, repeated, tag = "58")]
pub ineligibility_reason_list: ::prost::alloc::vec::Vec<IneligibilityReason>,
/// Event Contract's topic.
#[prost(string, optional, tag = "59")]
pub event_contract1: ::core::option::Option<::prost::alloc::string::String>,
/// Event contract's strike, expiry, and right.
#[prost(string, optional, tag = "60")]
pub event_contract_description1: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Complete event contract question.
#[prost(string, optional, tag = "61")]
pub event_contract_description2: ::core::option::Option<
::prost::alloc::string::String,
>,
/// Smallest order quantity for an algorithmic order.
#[prost(string, optional, tag = "62")]
pub min_algo_size: ::core::option::Option<::prost::alloc::string::String>,
/// Decimal level rounding for the contract.
#[prost(string, optional, tag = "63")]
pub last_price_precision: ::core::option::Option<::prost::alloc::string::String>,
/// Floating point rounding for order sizes.
#[prost(string, optional, tag = "64")]
pub last_size_precision: ::core::option::Option<::prost::alloc::string::String>,
/// How a product may settle on expiry. Supports "Physical" and "Cash".
#[prost(string, optional, tag = "65")]
pub settlement_method: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PositionMulti {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "2")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "3")]
pub contract: ::core::option::Option<Contract>,
/// The number of shares held.
#[prost(string, optional, tag = "4")]
pub position: ::core::option::Option<::prost::alloc::string::String>,
/// Average cost of the overall position.
#[prost(double, optional, tag = "5")]
pub avg_cost: ::core::option::Option<f64>,
/// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
#[prost(string, optional, tag = "6")]
pub model_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WshMetaData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Json formatted data containing WSH details.
#[prost(string, optional, tag = "2")]
pub data_json: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateDisplayGroupRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The encoded value that uniquely represents the contract in IB. Possible values include:\[none: empty selection, contractID@exchange: any non-combination contract., combo: if any combo is selected.\].
#[prost(string, optional, tag = "2")]
pub contract_info: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelWshEventData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaceOrderRequest {
/// The API client's order id.
#[prost(int32, optional, tag = "1")]
pub order_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// The currently active Order.
#[prost(message, optional, tag = "3")]
pub order: ::core::option::Option<Order>,
/// Attached Take Profit and Stop Loss order identifiers.
#[prost(message, optional, tag = "4")]
pub attached_orders: ::core::option::Option<AttachedOrders>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PnL {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Current day's total profit and loss.
#[prost(double, optional, tag = "2")]
pub daily_pn_l: ::core::option::Option<f64>,
/// Unrealized profit and loss for the current day's trading session.
#[prost(double, optional, tag = "3")]
pub unrealized_pn_l: ::core::option::Option<f64>,
/// Daily realized profit and loss on the position.
#[prost(double, optional, tag = "4")]
pub realized_pn_l: ::core::option::Option<f64>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HistoricalSession {
/// The datetime when the request should be submitted. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
#[prost(string, optional, tag = "1")]
pub start_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
#[prost(string, optional, tag = "2")]
pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// Reference date for the bar.
#[prost(string, optional, tag = "3")]
pub ref_date: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalSchedule {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The datetime when the request should be submitted. Formatted as "YYYYMMDD-HH:mm:ss" to assume UTC or "YYYYMMDD HH:mm:ss TMZ".
#[prost(string, optional, tag = "2")]
pub start_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
#[prost(string, optional, tag = "3")]
pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// Timezone of the schedule request.
#[prost(string, optional, tag = "4")]
pub time_zone: ::core::option::Option<::prost::alloc::string::String>,
/// An array of objects containing Start, End, and Ref Date.
#[prost(message, repeated, tag = "5")]
pub historical_sessions: ::prost::alloc::vec::Vec<HistoricalSession>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecutionDetails {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// The Execution Object details.
#[prost(message, optional, tag = "3")]
pub execution: ::core::option::Option<Execution>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeToGroupEventsRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The identifier for a set of groups to receive data from.
#[prost(int32, optional, tag = "2")]
pub group_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrderBound {
/// The Host order identifier.
#[prost(int64, optional, tag = "1")]
pub perm_id: ::core::option::Option<i64>,
/// The API client id which placed the order.
#[prost(int32, optional, tag = "2")]
pub client_id: ::core::option::Option<i32>,
/// The API client's order id.
#[prost(int32, optional, tag = "3")]
pub order_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetServerLogLevelRequest {
/// Internal use. Declare level of logging from server.
#[prost(int32, optional, tag = "1")]
pub log_level: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SmartComponents {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Exchange mapping identifiers (such as "a6" or "a9") used in the TWS API via the reqSmartComponents function to decode single-letter exchange routing codes and aggregate multi-venue quotes.
#[prost(message, repeated, tag = "2")]
pub smart_components: ::prost::alloc::vec::Vec<SmartComponent>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StartApiRequest {
/// The API client id which placed the order.
#[prost(int32, optional, tag = "1")]
pub client_id: ::core::option::Option<i32>,
/// Additional behavior triggers when connecting the API.
#[prost(string, optional, tag = "2")]
pub optional_capabilities: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompletedOrdersEnd {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDataRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Comma separated ids of the available generic ticks.
#[prost(string, optional, tag = "3")]
pub generic_tick_list: ::core::option::Option<::prost::alloc::string::String>,
/// Indicate that a snapshot should be requested rather than a data stream.
#[prost(bool, optional, tag = "4")]
pub snapshot: ::core::option::Option<bool>,
/// Set to True for a paid, regulatory snapshot or False for live data.
#[prost(bool, optional, tag = "5")]
pub regulatory_snapshot: ::core::option::Option<bool>,
/// Internal use. Unique attributes for market data request.
#[prost(map = "string, string", tag = "6")]
pub market_data_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TickByTickRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Type of data the tick represents.
#[prost(string, optional, tag = "3")]
pub tick_type: ::core::option::Option<::prost::alloc::string::String>,
/// Number of distinct data points. Max is 1000 per request.
#[prost(int32, optional, tag = "4")]
pub number_of_ticks: ::core::option::Option<i32>,
/// Omit updates that reflect only changes in size, and not price. Applicable to Bid\_Ask data requests.
#[prost(bool, optional, tag = "5")]
pub ignore_size: ::core::option::Option<bool>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct QueryDisplayGroupsRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PriceIncrement {
/// The minimum value for triggering the affiliate increment.
#[prost(double, optional, tag = "1")]
pub low_edge: ::core::option::Option<f64>,
/// The change in price or size value.
#[prost(double, optional, tag = "2")]
pub increment: ::core::option::Option<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NextValidId {
/// The API client's order id.
#[prost(int32, optional, tag = "1")]
pub order_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateConfigWarning {
/// Unique identifier for the setting.
#[prost(int32, optional, tag = "1")]
pub message_id: ::core::option::Option<i32>,
/// Message headline or summary.
#[prost(string, optional, tag = "2")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
/// The news bulletin context.
#[prost(string, optional, tag = "3")]
pub message: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsArticle {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The type of news article (0 – plain text or html, 1 – binary data / pdf).
#[prost(int32, optional, tag = "2")]
pub article_type: ::core::option::Option<i32>,
/// The body of article. If articleType == 1, the binary data is encoded using the Base64 scheme.
#[prost(string, optional, tag = "3")]
pub article_text: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalDataRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// The request's end date and time. This should be formatted as "YYYYMMDD HH:mm:ss TMZ" or an empty string indicates current present moment.
#[prost(string, optional, tag = "3")]
pub end_date_time: ::core::option::Option<::prost::alloc::string::String>,
/// The data’s granularity or Valid Bar Sizes.
#[prost(string, optional, tag = "4")]
pub bar_size_setting: ::core::option::Option<::prost::alloc::string::String>,
/// Specifies the number of seconds the order should remain active. For GTD orders only. Users that would prefer to specify an exact date should user the "GoodTillDate" parameter instead. Both values cannot be specified at the same time.
#[prost(string, optional, tag = "5")]
pub duration: ::core::option::Option<::prost::alloc::string::String>,
/// Declare that the request should only include Regular Trading Hours. Extended trading hours will be excluded.
#[prost(bool, optional, tag = "6")]
pub use_rth: ::core::option::Option<bool>,
/// Data source type.
#[prost(string, optional, tag = "7")]
pub what_to_show: ::core::option::Option<::prost::alloc::string::String>,
/// Using 1 will return UTC time in YYYYMMDD-hh:mm:ss format. Using 2 will return epoch time.
#[prost(int32, optional, tag = "8")]
pub format_date: ::core::option::Option<i32>,
/// true indicates that historical data should be continuously delivered to EWrapper.HistoricalDataUpdate.
#[prost(bool, optional, tag = "9")]
pub keep_up_to_date: ::core::option::Option<bool>,
/// This is a field used exclusively for internal use.
#[prost(map = "string, string", tag = "10")]
pub chart_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ScannerParameters {
/// String Representation of an XML document.
#[prost(string, optional, tag = "1")]
pub xml: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RerouteMarketDepthRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The unique IB contract identifier.
#[prost(int32, optional, tag = "2")]
pub con_id: ::core::option::Option<i32>,
/// The destination exchange.
#[prost(string, optional, tag = "3")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PnLRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "2")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
#[prost(string, optional, tag = "3")]
pub model_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PositionsMultiRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "2")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
#[prost(string, optional, tag = "3")]
pub model_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConfigResponse {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Current status of the order.
#[prost(string, optional, tag = "2")]
pub status: ::core::option::Option<::prost::alloc::string::String>,
/// The news bulletin context.
#[prost(string, optional, tag = "3")]
pub message: ::core::option::Option<::prost::alloc::string::String>,
/// All fields changed from the UpdateConfigRequest.
#[prost(string, repeated, tag = "4")]
pub changed_fields: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Proto path that failed to update.
#[prost(string, repeated, tag = "5")]
pub errors: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Object containing detailed warnings about setting modification.
#[prost(message, repeated, tag = "6")]
pub warnings: ::prost::alloc::vec::Vec<UpdateConfigWarning>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScannerDataElement {
/// Position of the sorted scanner results.
#[prost(int32, optional, tag = "1")]
pub rank: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Instrument's local name.
#[prost(string, optional, tag = "3")]
pub market_name: ::core::option::Option<::prost::alloc::string::String>,
/// Internal use only.
#[prost(string, optional, tag = "4")]
pub distance: ::core::option::Option<::prost::alloc::string::String>,
/// Always returns an empty string.
#[prost(string, optional, tag = "5")]
pub benchmark: ::core::option::Option<::prost::alloc::string::String>,
/// Internal use only.
#[prost(string, optional, tag = "6")]
pub projection: ::core::option::Option<::prost::alloc::string::String>,
/// Describes the combo legs when the scanner is returning EFP.
#[prost(string, optional, tag = "7")]
pub combo_key: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScannerData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Represents a single scanner data object, which contains rank, contract, marketName, distance, benchmark, projection, and comboKey.
#[prost(message, repeated, tag = "2")]
pub scanner_data_element: ::prost::alloc::vec::Vec<ScannerDataElement>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MatchingSymbolsRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Either start of ticker symbol or (for larger strings) company name.
#[prost(string, optional, tag = "2")]
pub pattern: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FamilyCode {
/// The account identifier.
#[prost(string, optional, tag = "1")]
pub account_id: ::core::option::Option<::prost::alloc::string::String>,
/// Account identifiers.
#[prost(string, optional, tag = "2")]
pub family_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FamilyCodes {
/// Unique family codes array of accountIds.
#[prost(message, repeated, tag = "1")]
pub family_codes: ::prost::alloc::vec::Vec<FamilyCode>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewsArticleRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// News provider code based on requested data.
#[prost(string, optional, tag = "2")]
pub provider_code: ::core::option::Option<::prost::alloc::string::String>,
/// Identifier used to track the news article. See [EClient.reqNewsArticle](/tws-api/doc/news/news-articles/request-news-articles) for more details.
#[prost(string, optional, tag = "3")]
pub article_id: ::core::option::Option<::prost::alloc::string::String>,
/// Reserved for internal use. Should be defined as null.
#[prost(map = "string, string", tag = "4")]
pub news_article_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyCompleted {
/// States that verification succeeded.
#[prost(bool, optional, tag = "1")]
pub is_successful: ::core::option::Option<bool>,
/// Failed verification text.
#[prost(string, optional, tag = "2")]
pub error_text: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Object containing a Contract object along with related attributes for trading. See ContractDetails for more details.
#[prost(message, optional, tag = "3")]
pub contract_details: ::core::option::Option<ContractDetails>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RealTimeBarTick {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Trigger time for the request. Formatted as HH:MM:ss (UTC assumed if timezone note set).
#[prost(int64, optional, tag = "2")]
pub time: ::core::option::Option<i64>,
/// The bar's open point.
#[prost(double, optional, tag = "3")]
pub open: ::core::option::Option<f64>,
/// The bar's high point.
#[prost(double, optional, tag = "4")]
pub high: ::core::option::Option<f64>,
/// The bar's low point.
#[prost(double, optional, tag = "5")]
pub low: ::core::option::Option<f64>,
/// The last execution price of the bar.
#[prost(double, optional, tag = "6")]
pub close: ::core::option::Option<f64>,
/// The bar's traded volume (only returned for TRADES data).
#[prost(string, optional, tag = "7")]
pub volume: ::core::option::Option<::prost::alloc::string::String>,
/// Weighted Average Price of the returning bar.
#[prost(string, optional, tag = "8")]
pub wap: ::core::option::Option<::prost::alloc::string::String>,
/// Total trades within the bar.
#[prost(int32, optional, tag = "9")]
pub count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ManagedAccounts {
/// A comma-separated string with the managed account ids.
#[prost(string, optional, tag = "1")]
pub accounts_list: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TickSize {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Type of data the tick represents.
#[prost(int32, optional, tag = "2")]
pub tick_type: ::core::option::Option<i32>,
/// Represents volume of the order data.
#[prost(string, optional, tag = "3")]
pub size: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisplayGroupUpdated {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The encoded value that uniquely represents the contract in IB. Possible values include:\[none: empty selection, contractID@exchange: any non-combination contract., combo: if any combo is selected\].
#[prost(string, optional, tag = "2")]
pub contract_info: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewsProviders {
/// Unique array containing all available news sources.
#[prost(message, repeated, tag = "1")]
pub news_providers: ::prost::alloc::vec::Vec<NewsProvider>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HistoricalData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// An array of HistoricalDataBar objects.
#[prost(message, repeated, tag = "2")]
pub historical_data_bars: ::prost::alloc::vec::Vec<HistoricalDataBar>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelHeadTimestamp {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketDepthExchanges {
/// A proprietary list of objects containing Exchange, SecType, ListingExch, serviceDataType, and AggGroup.
#[prost(message, repeated, tag = "1")]
pub depth_market_data_descriptions: ::prost::alloc::vec::Vec<
DepthMarketDataDescription,
>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AllOpenOrdersRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SecDefOptParameter {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The destination exchange.
#[prost(string, optional, tag = "2")]
pub exchange: ::core::option::Option<::prost::alloc::string::String>,
/// IBKR Contract Identifier of the underlying contract.
#[prost(int32, optional, tag = "3")]
pub underlying_con_id: ::core::option::Option<i32>,
/// The trading class name for this contract. Available in TWS contract description window as well. For example, weekly S&P options are "SPXW" compared to the monthly contract which uses "SPX".
#[prost(string, optional, tag = "4")]
pub trading_class: ::core::option::Option<::prost::alloc::string::String>,
/// The instrument's multiplier (i.e. options, futures).
#[prost(string, optional, tag = "5")]
pub multiplier: ::core::option::Option<::prost::alloc::string::String>,
/// A list of the expiries for the options of this underlying on this exchange.
#[prost(string, repeated, tag = "6")]
pub expirations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// The list of strikes for the given contract.
#[prost(double, repeated, tag = "7")]
pub strikes: ::prost::alloc::vec::Vec<f64>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NewsBulletinsRequest {
/// Indicate if all bulletins should be returned.
#[prost(bool, optional, tag = "1")]
pub all_messages: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SoftDollarTiers {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Financial Advisor commission tiers.
#[prost(message, repeated, tag = "2")]
pub soft_dollar_tiers: ::prost::alloc::vec::Vec<SoftDollarTier>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelPositions {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExerciseOptionsRequest {
/// The API client's order id.
#[prost(int32, optional, tag = "1")]
pub order_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// Set to 1 to exercise the option, set to 2 to let the option lapse.
#[prost(int32, optional, tag = "3")]
pub exercise_action: ::core::option::Option<i32>,
/// Number of contracts to be exercised.
#[prost(int32, optional, tag = "4")]
pub exercise_quantity: ::core::option::Option<i32>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "5")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Indicate if the default options exercise behavior should be overwritten.
#[prost(bool, optional, tag = "6")]
pub r#override: ::core::option::Option<bool>,
/// Used by brokers and advisors when manually entering an order request. Format should be "YYYYMMDD-HH:mm:ss" using UTC as the timezone value.
#[prost(string, optional, tag = "7")]
pub manual_order_time: ::core::option::Option<::prost::alloc::string::String>,
/// Required for Nondisclosed Omnibus Accounts. A unique identifier for each account within the Omnibus structure to signify the account holder being traded. Best practice (Not Required): clients should look to hash this value, using something along the lines of 5 digits of SHA1 of the account number. This should not be implemented for non-omnibus accounts.
#[prost(string, optional, tag = "8")]
pub customer_account: ::core::option::Option<::prost::alloc::string::String>,
/// true indicates account represents an institutional or professional trader.
#[prost(bool, optional, tag = "9")]
pub professional_customer: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateConfigRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// API Settings configuration for the "Lock and Exit" Global Configuration page.
#[prost(message, optional, tag = "2")]
pub lock_and_exit: ::core::option::Option<LockAndExitConfig>,
/// Complementary messages identifying settings.
#[prost(message, repeated, tag = "3")]
pub messages: ::prost::alloc::vec::Vec<MessageConfig>,
/// Host object of all Global Configuration -> API sub-menu settings.
#[prost(message, optional, tag = "4")]
pub api: ::core::option::Option<ApiConfig>,
/// Order configuration settings from the Global Configuration.
#[prost(message, optional, tag = "5")]
pub orders: ::core::option::Option<OrdersConfig>,
/// A list of warning messages displayed in the Global Configuration -> Messages.
#[prost(message, repeated, tag = "6")]
pub accepted_warnings: ::prost::alloc::vec::Vec<UpdateConfigWarning>,
/// Submit as true to reset the orderId sequence back to 0.
#[prost(bool, optional, tag = "7")]
pub reset_api_order_sequence: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountUpdatesMultiRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "2")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
#[prost(string, optional, tag = "3")]
pub model_code: ::core::option::Option<::prost::alloc::string::String>,
/// Set as True if currency and net liquidation values should be delivered with updates.
#[prost(bool, optional, tag = "4")]
pub ledger_and_nlv: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WshEventData {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// All event data delivered as a string formatted as JSON.
#[prost(string, optional, tag = "2")]
pub data_json: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelPositionsMulti {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PnLSingleRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// The IBKR account identifier to affiliate the request with.
#[prost(string, optional, tag = "2")]
pub account: ::core::option::Option<::prost::alloc::string::String>,
/// Financial advisor model portfolio code identifier. Individual accounts should pass an empty string.
#[prost(string, optional, tag = "3")]
pub model_code: ::core::option::Option<::prost::alloc::string::String>,
/// The unique IB contract identifier.
#[prost(int32, optional, tag = "4")]
pub con_id: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountSummaryEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyMessageApi {
/// Displays data coming from a third party resource.
#[prost(string, optional, tag = "1")]
pub api_data: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnsubscribeFromGroupEventsRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MarketRule {
/// Market Rule ID requested.
#[prost(int32, optional, tag = "1")]
pub market_rule_id: ::core::option::Option<i32>,
/// Returns the available price increments based on the market rule.
#[prost(message, repeated, tag = "2")]
pub price_increments: ::prost::alloc::vec::Vec<PriceIncrement>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CurrentTimeInMillisRequest {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisplayGroupList {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Returns a list of integers representing visible Group ID separated by the pipe "|" character and sorted by most used group first.
#[prost(string, optional, tag = "2")]
pub groups: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReplaceFaEnd {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Additional details of the Allocation Group replacements.
#[prost(string, optional, tag = "2")]
pub text: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct FaReplace {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Receive the faDataType value specified in the requestFA. See [FA Data Types](#fa-data-types).
#[prost(int32, optional, tag = "2")]
pub fa_data_type: ::core::option::Option<i32>,
/// String Representation of an XML document.
#[prost(string, optional, tag = "3")]
pub xml: ::core::option::Option<::prost::alloc::string::String>,
}
/// empty
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MarketDepthExchangesRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContractDataRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountDataRequest {
/// Indicate if data should be continuously returned.
#[prost(bool, optional, tag = "1")]
pub subscribe: ::core::option::Option<bool>,
/// Account code identifying the account to receive updates for.
#[prost(string, optional, tag = "2")]
pub acct_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PortfolioValue {
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "1")]
pub contract: ::core::option::Option<Contract>,
/// The number of shares held.
#[prost(string, optional, tag = "2")]
pub position: ::core::option::Option<::prost::alloc::string::String>,
/// The instrument's unitary price.
#[prost(double, optional, tag = "3")]
pub market_price: ::core::option::Option<f64>,
/// Total market value of the instrument.
#[prost(double, optional, tag = "4")]
pub market_value: ::core::option::Option<f64>,
/// Average cost of the overall position.
#[prost(double, optional, tag = "5")]
pub average_cost: ::core::option::Option<f64>,
/// Unrealized profit and loss for the current day's trading session.
#[prost(double, optional, tag = "6")]
pub unrealized_pnl: ::core::option::Option<f64>,
/// Daily realized profit and loss on the position.
#[prost(double, optional, tag = "7")]
pub realized_pnl: ::core::option::Option<f64>,
/// The account identifier.
#[prost(string, optional, tag = "8")]
pub account_name: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CalculateOptionPriceRequest {
/// Unique request identifier used for tracking across EWrapper.
#[prost(int32, optional, tag = "1")]
pub req_id: ::core::option::Option<i32>,
/// Contract object containing defining characteristics for ticker.
#[prost(message, optional, tag = "2")]
pub contract: ::core::option::Option<Contract>,
/// The implied volatility to use for calculating the option price.
#[prost(double, optional, tag = "3")]
pub volatility: ::core::option::Option<f64>,
/// Price of the underlying contract to calculate against.
#[prost(double, optional, tag = "4")]
pub under_price: ::core::option::Option<f64>,
/// Internal use only. Send an empty tag value list.
#[prost(map = "string, string", tag = "5")]
pub option_price_options: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}