latestOpenAPI 3.1.02026-08-22181751733.6 KB

67f9f562c2c6

tradingPortfolio

Account Position In An Instrument

Get position for a given instrument in a single account.

get/portfolio/{accountId}/position/{conid}

Path parameters

accountIdstring required
conidinteger required

Response

Position details by conid

acctIdstring

IB accountId of an account with a position in the requested conid.

allExchangesstring

Comma separated all exchanges on which the instrument trades.

assetClassstring

Asset class of the requested instrument.

avgCostnumber double

The account's average cost for its position.

avgPricenumber double

The account's average price for its position.

baseAvgCostnumber double

Average cost in the account's base currency.

baseAvgPricenumber double

Average price in the account's base currency.

baseMktPricenumber double

Market price of instrument in the account's base currency.

baseMktValuenumber double

Market value of the position in the account's base currency.

baseRealizedPnlnumber double

Realized PnL for the instrument in the account's base currency.

baseUnrealizedPnlnumber double

Unrealized PnL for the instrument in the account's base currency.

chineseNamestring

Chinese name of the instrument.

conidinteger

IB contract ID for the instrument.

contractDescstring

Human-readable description of the instrument.

countryCodestring

Country in which the instrument is issued.

currencystring

Currency in which the instrument trades.

exchsIndividualPositionExchs
exerciseStylestring nullable

Style of exercise for options.

expirystring nullable

Expiration of instrument, if applicable.

fullNamestring

Full display name of the instrument.

groupstring

Industry sub-categorization of the instrument.

hasOptionsboolean

Indicates whether instrument has options contracts available for trading at IB.

isEventContractboolean

Indicates whether the instrument is an Event Contract.

isUSboolean

Indicates whether the instrument is issued in the US.

lastTradingDaystring

Last day of trading in the instrument, if applicable. Formatted YYYYMMDD.

listingExchangestring

The exchange on which the instrument is listed, or the primary exchange recognized by IB for the instrument.

mktPricenumber double

Current market price of the instrument, in the instrument's currency.

mktValuenumber double

Current market value of the account's position in the instrument, in the instrument's currency.

modelstring

Name of the model portfolio in which the account is invested that contributes this position.

multipliernumber double

Instrument's multiplier, if applicable.

namestring

Formal name of the entity or asset to which the instrument relates.

pageSizeinteger

Maximum number of accounts that can be returned in a single request.

positionnumber double

Size of position in units of instrument.

putOrCall'P' | 'C'

The right of an options contract, if applicable.

realizedPnlnumber double

Realized PnL for the instrument in the instrument's currency.

sectorstring

Industry sector categorization of the instrument.

sectorGroupstring

Industry sub-categorization of the instrument.

strikestring

Strike price, if applicable. Returned as string.

tickerstring

Symbol associated with the instrument.

timeinteger

Time taken to retrieve position data in milliseconds.

typestring

Description of instrument, used to differentiate classes, if applicable.

undConidinteger

Contract ID of underlying instrument, if applicable.

unrealizedPnlnumber double

Unrealized PnL for the instrument in the account.