pub type Position = IndividualPosition;Expand description
Positions returned for an account. Alias over the generated type so callers
can use bezant::Position without digging into bezant_api.
Aliased Type§
pub struct Position {Show 46 fields
pub acct_id: Option<String>,
pub all_exchanges: Option<String>,
pub asset_class: Option<String>,
pub avg_cost: Option<f64>,
pub avg_price: Option<f64>,
pub base_avg_cost: Option<f64>,
pub base_avg_price: Option<f64>,
pub base_mkt_price: Option<f64>,
pub base_mkt_value: Option<f64>,
pub base_realized_pnl: Option<f64>,
pub base_unrealized_pnl: Option<f64>,
pub chinese_name: Option<String>,
pub con_exch_map: Option<Vec<Value>>,
pub conid: Option<i32>,
pub contract_desc: Option<String>,
pub country_code: Option<String>,
pub currency: Option<String>,
pub display_rule: Option<IndividualPositionDisplayRule>,
pub exchs: Option<Value>,
pub exercise_style: Option<String>,
pub expiry: Option<String>,
pub full_name: Option<String>,
pub group: Option<String>,
pub has_options: Option<bool>,
pub increment_rules: Option<Vec<IndividualPositionIncrementRule>>,
pub is_event_contract: Option<bool>,
pub is_us: Option<bool>,
pub last_trading_day: Option<String>,
pub listing_exchange: Option<String>,
pub mkt_price: Option<f64>,
pub mkt_value: Option<f64>,
pub model: Option<String>,
pub multiplier: Option<f64>,
pub name: Option<String>,
pub page_size: Option<i32>,
pub position: Option<f64>,
pub put_or_call: Option<IndividualPositionPutOrCall>,
pub realized_pnl: Option<f64>,
pub sector: Option<String>,
pub sector_group: Option<String>,
pub strike: Option<String>,
pub ticker: Option<String>,
pub time: Option<i32>,
pub type: Option<String>,
pub und_conid: Option<i32>,
pub unrealized_pnl: Option<f64>,
}Fields§
§acct_id: Option<String>IB accountId of an account with a position in the requested conid.
all_exchanges: Option<String>Comma separated all exchanges on which the instrument trades.
asset_class: Option<String>Asset class of the requested instrument.
avg_cost: Option<f64>The account’s average cost for its position.
avg_price: Option<f64>The account’s average price for its position.
base_avg_cost: Option<f64>Average cost in the account’s base currency.
base_avg_price: Option<f64>Average price in the account’s base currency.
base_mkt_price: Option<f64>Market price of instrument in the account’s base currency.
base_mkt_value: Option<f64>Market value of the position in the account’s base currency.
base_realized_pnl: Option<f64>Realized PnL for the instrument in the account’s base currency.
base_unrealized_pnl: Option<f64>Unrealized PnL for the instrument in the account’s base currency.
chinese_name: Option<String>Chinese name of the instrument.
con_exch_map: Option<Vec<Value>>§conid: Option<i32>IB contract ID for the instrument.
contract_desc: Option<String>Human-readable description of the instrument.
country_code: Option<String>Country in which the instrument is issued.
currency: Option<String>Currency in which the instrument trades.
display_rule: Option<IndividualPositionDisplayRule>Object defining minimum increments used in displaying market data for the instrument.
exchs: Option<Value>§exercise_style: Option<String>Style of exercise for options.
expiry: Option<String>Expiration of instrument, if applicable.
full_name: Option<String>Full display name of the instrument.
group: Option<String>Industry sub-categorization of the instrument.
has_options: Option<bool>Indicates whether instrument has options contracts available for trading at IB.
increment_rules: Option<Vec<IndividualPositionIncrementRule>>Array containing increment rules used when pricing orders for the instrument.
is_event_contract: Option<bool>Indicates whether the instrument is an Event Contract.
is_us: Option<bool>Indicates whether the instrument is issued in the US.
last_trading_day: Option<String>Last day of trading in the instrument, if applicable. Formatted YYYYMMDD.
listing_exchange: Option<String>The exchange on which the instrument is listed, or the primary exchange recognized by IB for the instrument.
mkt_price: Option<f64>Current market price of the instrument, in the instrument’s currency.
mkt_value: Option<f64>Current market value of the account’s position in the instrument, in the instrument’s currency.
model: Option<String>Name of the model portfolio in which the account is invested that contributes this position.
multiplier: Option<f64>Instrument’s multiplier, if applicable.
name: Option<String>Formal name of the entity or asset to which the instrument relates.
page_size: Option<i32>Maximum number of accounts that can be returned in a single request.
position: Option<f64>Size of position in units of instrument.
put_or_call: Option<IndividualPositionPutOrCall>The right of an options contract, if applicable.
realized_pnl: Option<f64>Realized PnL for the instrument in the instrument’s currency.
sector: Option<String>Industry sector categorization of the instrument.
sector_group: Option<String>Industry sub-categorization of the instrument.
strike: Option<String>Strike price, if applicable. Returned as string.
ticker: Option<String>Symbol associated with the instrument.
time: Option<i32>Time taken to retrieve position data in milliseconds.
type: Option<String>Description of instrument, used to differentiate classes, if applicable.
und_conid: Option<i32>Contract ID of underlying instrument, if applicable.
unrealized_pnl: Option<f64>Unrealized PnL for the instrument in the account.