Interactive Brokers
App · 20 actions
Read Client Portal accounts, positions, balances, orders, trades and market data.
Actions
| Action | What it does |
|---|---|
| Get account allocation | Account Allocation. |
| Get account ledger | Account Ledger. |
| Get account metadata | Account Information. |
| Get account summary | Account Summary. |
| Get brokerage accounts | Brokerage Accounts. |
| Get contract positions | Positions by Conid. |
| Get futures | Security Futures by Symbol. |
| Get market history | Market Data History. |
| Get market snapshot | Market Data. |
| Get option strikes | Search Strikes. |
| Get order status | Order Status. |
| Get position | Position by Conid. |
| Get security definition | Secdef Info. |
| Get stocks | Security Stocks by Symbol. |
| Get trading schedule | Get trading schedule for symbol. |
| List accounts | Portfolio Accounts. |
| List orders | Live Orders. |
| List positions | Portfolio Positions. |
| List subaccounts | List of Sub-Accounts. |
| List trades | List of Trades for the selected account. |
Get account allocation
Account Allocation.
Inputs
- Account
account_idtextRequired - account id
Outputs
datalist- Interactive Brokers response data.
Example output
{
"data": []
}Get account ledger
Account Ledger.
Inputs
- Account
account_idtextRequired - account id
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"BASE": {
"acctcode": "example",
"cashbalance": 1.0,
"commoditymarketvalue": 1.0,
"corporatebondsmarketvalue": 1.0,
"currency": "example",
"exchangerate": 1.0,
"funds": 1.0,
"futuremarketvalue": 1.0,
"interest": 1.0,
"issueroptionsmarketvalue": 1.0,
"key": "example",
"moneyfunds": 1.0,
"netliquidationvalue": 1.0,
"realizedpnl": 1.0,
"sessionid": 1,
"settledcash": 1.0,
"severity": 1,
"stockmarketvalue": 1.0,
"timestamp": 1,
"unrealizedpnl": 1.0,
"warrantsmarketvalue": 1.0
}
}
}Get account metadata
Account Information.
Inputs
- Account
account_idtextRequired - account id
Outputs
datalist- Interactive Brokers response data.
Example output
{
"data": []
}Get account summary
Account Summary.
Inputs
- Account
account_idtextRequired - account id
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"accountready": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accounttype": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accruedcash": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accruedcash-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accruedcash-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accruedcash-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accrueddividend": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accrueddividend-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accrueddividend-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"accrueddividend-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"availablefunds": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"availablefunds-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"availablefunds-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"availablefunds-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"billable": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"billable-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"billable-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"billable-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"buyingpower": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"cushion": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"daytradesremaining": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"daytradesremainingt+1": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"daytradesremainingt+2": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"daytradesremainingt+3": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"daytradesremainingt+4": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"equitywithloanvalue": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"equitywithloanvalue-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"equitywithloanvalue-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"equitywithloanvalue-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"excessliquidity": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"excessliquidity-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"excessliquidity-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"excessliquidity-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullavailablefunds": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullavailablefunds-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullavailablefunds-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullavailablefunds-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullexcessliquidity": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullexcessliquidity-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullexcessliquidity-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullexcessliquidity-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullinitmarginreq": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullinitmarginreq-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullinitmarginreq-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullinitmarginreq-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullmaintmarginreq": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullmaintmarginreq-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullmaintmarginreq-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"fullmaintmarginreq-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"grosspositionvalue": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"grosspositionvalue-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"grosspositionvalue-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"grosspositionvalue-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"guarantee": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"guarantee-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"guarantee-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"guarantee-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"highestseverity": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"highestseverity-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"highestseverity-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"highestseverity-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"indianstockhaircut": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"indianstockhaircut-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"indianstockhaircut-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"indianstockhaircut-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"initmarginreq": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"initmarginreq-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"initmarginreq-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"initmarginreq-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"leverage": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"leverage-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"leverage-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"leverage-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadavailablefunds": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadavailablefunds-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadavailablefunds-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadavailablefunds-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadexcessliquidity": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadexcessliquidity-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadexcessliquidity-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadexcessliquidity-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadinitmarginreq": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadinitmarginreq-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadinitmarginreq-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadinitmarginreq-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadmaintmarginreq": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadmaintmarginreq-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadmaintmarginreq-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadmaintmarginreq-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"lookaheadnextchange": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"maintmarginreq": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"maintmarginreq-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"maintmarginreq-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"maintmarginreq-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"netliquidation": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"netliquidation-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"netliquidation-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"netliquidation-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"netliquidationuncertainty": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"nlvandmargininreview": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"pasharesvalue": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"pasharesvalue-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"pasharesvalue-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"pasharesvalue-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"postexpirationexcess": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"postexpirationexcess-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"postexpirationexcess-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"postexpirationexcess-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"postexpirationmargin": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"postexpirationmargin-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"postexpirationmargin-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"postexpirationmargin-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"previousdayequitywithloanvalue": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"previousdayequitywithloanvalue-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"previousdayequitywithloanvalue-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"previousdayequitywithloanvalue-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"segmenttitle-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"segmenttitle-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"segmenttitle-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"totalcashvalue": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"totalcashvalue-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"totalcashvalue-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"totalcashvalue-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"totaldebitcardpendingcharges": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"totaldebitcardpendingcharges-c": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"totaldebitcardpendingcharges-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"totaldebitcardpendingcharges-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"tradingtype-f": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
},
"tradingtype-s": {
"amount": 1.0,
"currency": "example",
"isNull": false,
"timestamp": 1,
"value": "example"
}
}
}Get brokerage accounts
Brokerage Accounts.
Inputs
None.
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"accounts": [],
"aliases": {},
"selectedAccount": "example"
}
}Get contract positions
Positions by Conid.
Inputs
- Conid
conidtextRequired - contract id
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"ACCTID": []
}
}Get futures
Security Futures by Symbol.
Inputs
- Symbols
symbolstextRequired - list of case-sensitive symbols separated by comma
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"symbol": []
}
}Get market history
Market Data History.
Inputs
- Conid
conidtextRequired - contract id
- Exchange
exchangetext - Exchange of the conid (e.g. ISLAND, NYSE, etc.). Default value is empty which corresponds to primary exchange of the conid.
- Period
periodtextRequired - available time period-- {1-30}min, {1-8}h, {1-1000}d, {1-792}w, {1-182}m, {1-15}y
- Bar
bartext - possible value-- 1min, 2min, 3min, 5min, 10min, 15min, 30min, 1h, 2h, 3h, 4h, 8h, 1d, 1w, 1mOne of:
1min,2min,3min,5min,10min,15min,30min,1h,2h,3h, and 5 more. - Outside rth
outside_rthtrue/false - For contracts that support it, will determine if historical data includes outside of regular trading hours.
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"barLength": 1,
"data": [],
"high": "example",
"low": "example",
"mdAvailability": "example",
"messageVersion": 1,
"mktDataDelay": 1,
"negativeCapable": false,
"outsideRth": false,
"points": 1,
"priceDisplayRule": 1,
"priceDisplayValue": "example",
"priceFactor": 1,
"startTime": "example",
"symbol": "example",
"text": "example",
"timePeriod": "example",
"tradingDayDuration": 1,
"travelTime": 1,
"volumeFactor": 1
}
}Get market snapshot
Market Data.
Inputs
- Conids
conidstextRequired - list of conids separated by comma
- Since
sincenumber - time period since which updates are required. uses epoch time with milliseconds.
- Fields
fieldstext - list of fields separated by comma
Outputs
datalist- Interactive Brokers response data.
Example output
{
"data": []
}Get option strikes
Search Strikes.
Inputs
- Conid
conidtextRequired - contract id of the underlying contract
- Sectype
sectypetextRequired - OPT/WAROne of:
STK,OPT,FUT,CASH,IND,FOP,BOND,WAR,CFD. - Month
monthtextRequired - contract month
- Exchange
exchangetext - optional, default is SMART
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"call": [],
"put": []
}
}Get order status
Order Status.
Inputs
- Order ID
order_idtextRequired - Customer order id, use /iservers/account/orders endpoint to query orderId.
Outputs
dataobject- contains all the details of an order
Example output
{
"data": {
"account": "example",
"alert_active": 1,
"allowed_duplicate_opposite": false,
"available_chart_periods": "example",
"bg_color": "example",
"cannot_cancel_order": false,
"child_order_type": "example",
"company_name": "example",
"conidex": "example",
"contract_description_1": "example",
"cum_fill": "example",
"currency": "example",
"deactivate_order": false,
"editable_fields": "example",
"exit_strategy_chart_description": "example",
"exit_strategy_display_price": "example",
"exit_strategy_tool_availability": 1,
"fg_color": "example",
"limit_price": "example",
"listing_exchange": "example",
"oca_group_id": "example",
"option_acct": "example",
"order_description": "example",
"order_description_with_contract": "example",
"order_id": 1,
"order_not_editable": false,
"order_status": "example",
"order_status_description": "example",
"order_time": "example",
"order_type": "example",
"outside_rth": false,
"request_id": "example",
"sec_type": "example",
"side": "B",
"size": "example",
"size_and_fills": "example",
"stop_price": "example",
"sub_type": "example",
"symbol": "example",
"tif": "example",
"total_size": "example",
"use_price_mgmt_algo": false
}
}Get position
Position by Conid.
Inputs
- Account
account_idtextRequired - account id
- Conid
conidtextRequired - contract id
Outputs
datalist- Interactive Brokers response data.
Example output
{
"data": []
}Get security definition
Secdef Info.
Inputs
- Conid
conidtextRequired - underlying contract id
- Sectype
sectypetextRequired - FUT/OPT/WAR/CASH/CFDOne of:
STK,OPT,FUT,CASH,IND,FOP,BOND,WAR,CFD. - Month
monthtext - contract month, only required for FUT/OPT/WAR in the format MMMYY, example JAN00
- Exchange
exchangetext - optional, default is SMART
- Strike
strikenumber - optional, only required for OPT/WAR
- Right
righttext - C for call, P for putOne of:
C,P.
Outputs
datatext- Interactive Brokers response data.
Example output
{
"data": "example"
}Get stocks
Security Stocks by Symbol.
Inputs
- Symbols
symbolstextRequired - list of upper-sensitive symbols separated by comma
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"symbol": []
}
}Get trading schedule
Get trading schedule for symbol.
Inputs
- Asset class
asset_classtextRequired - specify the asset class of the contract. Available values-- Stock: STK, Option: OPT, Future: FUT, Contract For Difference: CFD, Warrant: WAR, Forex: SWP, Mutual Fund: FND, Bond: BND, Inter-Commodity Spreads: ICSOne of:
STK,OPT,FUT,CASH,IND,FOP,BOND,WAR,CFD. - Symbol
symboltextRequired - Underlying Symbol for specified contract, for example 'AAPL' for US Stock - Apple Inc.
- Exchange
exchangetext - Native exchange for contract, for example 'NASDAQ' for US Stock - Apple Inc.
- Exchange filter
exchange_filtertext - Response only returns trading schedule for specified exchange
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"id": "example",
"schedules": [],
"tradeVenueId": "example"
}
}List accounts
Portfolio Accounts.
Inputs
None.
Outputs
datalist- Interactive Brokers response data.
Example output
{
"data": []
}List orders
Live Orders.
Inputs
- Filters
filterstext - list of filters separated by comma
Outputs
dataobject- Interactive Brokers response data.
Example output
{
"data": {
"filters": [],
"orders": [],
"snapshot": false
}
}List positions
Portfolio Positions.
Inputs
- Account
account_idtextRequired - account id
- Page ID
page_idtextRequired - page id
- Model
modeltext - optional
- Sort
sorttext - declare the table to be sorted by which column
- Direction
directiontext - in which order, a means ascending - d means descendingOne of:
a,d. - Period
periodtext - period for pnl column, can be 1D, 7D, 1M...
Outputs
datalist- Interactive Brokers response data.
Example output
{
"data": []
}List subaccounts
List of Sub-Accounts.
Inputs
None.
Outputs
dataobject- account information
Example output
{
"data": {
"accountAlias": "example",
"accountId": "example",
"accountStatus": 1.0,
"accountTitle": "example",
"accountVan": "example",
"clearingStatus": "O",
"covestor": false,
"currency": "AUD",
"desc": "example",
"displayName": "accountTitle",
"faclient": false,
"id": "example",
"parent": {
"accountId": "example",
"isMChild": false,
"isMParent": false,
"isMultiplex": false,
"mmc": []
},
"tradingType": "example",
"type": "INDIVIDUAL"
}
}List trades
List of Trades for the selected account.
Inputs
None.
Outputs
datalist- Interactive Brokers response data.
Example output
{
"data": []
}