Skip to content

Commit e205bc4

Browse files
authored
Merge pull request #136 from ohadcn/master
update `snapshot_by_key` in `ibkr_definitions`
2 parents 67906e3 + dae01a1 commit e205bc4

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

ibind/client/ibkr_client_mixins/marketdata_mixin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def live_marketdata_snapshot_by_symbol(self: 'IbkrClient', queries: StockQueries
7171

7272
for key, value in entry.items():
7373
if key not in snapshot_by_id:
74+
result[key] = value
7475
continue
7576

7677
result[snapshot_by_id[key]] = value

ibind/client/ibkr_definitions.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
'underlying_conid': '6457', # Underlying Conid. Use /trsrv/secdef to get more information about the security
1414
'market_data_availability': '6509', # Market Data Availability. The field may contain three chars. First char defines: R = RealTime, D = Delayed, Z = Frozen, Y = Frozen Delayed, N = Not Subscribed. Second char defines: P = Snapshot, p = Consolidated. Third char defines: B = Book
1515
'conid_exchange': '7094', # Conid + Exchange
16+
'contract_description': '7219', # Contract Description
17+
'contract_description_alt': '7220', # Contract Description (alternative)
1618

17-
##Regulator snapshot
19+
# Regulator snapshot
1820
'ask_codes': '7057', # Returns the series of character codes for the Ask exchange.
19-
2021
'bid_codes': '7068', # Returns the series of character codes for the Bid exchange.
21-
2222
'last_exch_codes': '7058', # Returns the series of character codes for the Last exchange.
2323

2424
# Price and Volume
@@ -63,7 +63,7 @@
6363
'ema_20': '7677', # EMA(20) - Exponential moving average (N=20).
6464
'price_to_ema_200_percent': '7678', # Price/EMA(200) - Price to Exponential moving average (N=200) ratio -1, displayed in percents.
6565
'price_to_ema_100_percent': '7679', # Price/EMA(100) - Price to Exponential moving average (N=100) ratio -1, displayed in percents.
66-
'price_to_ema_50_percent': '7680', # Price/EMA(50) - Price to Exponential moving average (N=50) ratio -1, displayed in percents.
66+
'price_to_ema_50_percent': '7724', # Price/EMA(50) - Price to Exponential moving average (N=50) ratio -1, displayed in percents.
6767
'price_to_ema_20_percent': '7681', # Price/EMA(20) - Price to Exponential moving average (N=20) ratio -1, displayed in percents.
6868

6969
# Portfolio
@@ -92,6 +92,7 @@
9292
'issue_date': '7715', # Issue Date
9393
'organization_type': '7704', # Organization Type
9494
'debt_class': '7705', # Debt Class
95+
'text': '58', # Text
9596

9697
# Options and Futures
9798
'opt_volume': '7089', # Opt. Volume - Option Volume
@@ -104,8 +105,10 @@
104105
'profit_probability': '7703', # Profit Probability - Customer implied probability of any gain.
105106
'last_yield': '7698', # Last Yield - Implied yield of the bond if it is purchased at the current last price. Last yield is calculated using the Last price on all possible call dates. It is assumed that prepayment occurs if the bond has call or put provisions and the issuer can offer a lower coupon rate based on current market rates. The yield to worst will be the lowest of the yield to maturity or yield to call (if the bond has prepayment provisions). Yield to worse may be the same as yield to maturity but never higher.
106107
'bid_yield': '7699', # Bid Yield - Implied yield of the bond if it is purchased at the current bid price. Bid yield is calculated using the Ask on all possible call dates. It is assumed that prepayment occurs if the bond has call or put provisions and the issuer can offer a lower coupon rate based on current market rates. The yield to worst will be the lowest of the yield to maturity or yield to call (if the bond has prepayment provisions). Yield to worse may be the same as yield to maturity but never higher.
108+
'ask_yield': '7720', # Ask Yield - Implied yield of the bond if it is purchased at the current offer. Ask yield is calculated using the Bid on all possible call dates. It is assumed that prepayment occurs if the bond has call or put provisions and the issuer can offer a lower coupon rate based on current market rates. The yield to worst will be the lowest of the yield to maturity or yield to call (if the bond has prepayment provisions). Yield to worse may be the same as yield to maturity but never higher.
107109
'futures_open_interest': '7697', # Futures Open Interest - Total number of outstanding futures contracts
108110
'shortable_shares': '7636', # Number of shares available for shorting.
111+
'shortable_fee_rate_percent': '7637', # Shortable Fee Rate % - The fee rate charged for shorting the security, expressed as an annualized percentage.
109112
'put_call_interest': '7085', # Put/Call Interest - Put option open interest/call option open interest for the trading day.
110113
'put_call_volume': '7086', # Put/Call Volume - Put option volume/call option volume for the trading day.
111114
'option_implied_vol_percent': '7283', # Option Implied Vol. % - A prediction of how volatile an underlying will be in the future. At the market volatility estimated for a maturity thirty calendar days forward of the current trading day, and based on option prices from two consecutive expiration months. To query the Implied Vol. % of a specific strike refer to field 7633.
@@ -114,6 +117,8 @@
114117
'theta': '7310', # Theta - A measure of the rate of decline the value of an option due to the passage of time.
115118
'vega': '7311', # Vega - The amount that the price of an option changes compared to a 1% change in the volatility.
116119
'implied_vol_percent': '7633', # Implied Vol. % - The implied volatility for the specific strike of the option in percentage. To query the Option Implied Vol. % from the underlying refer to field 7283.
120+
'opt_volume_change_percent': '7607', # Opt. Volume Change % - Today's option volume as a percentage of the average option volume.
121+
'right': '201', # Right - Returns the right of the instrument, such as P for Put or C for Call.
117122

118123
# Wall Street Horizon
119124
'upcoming_event': '7683', # Upcoming Event - Shows the next major company event. Requires Wall Street Horizon subscription.
@@ -124,8 +129,14 @@
124129
'recent_analyst_meeting': '7688', # Recent Analyst Meeting - The date and time of the most recent analyst meeting. Requires Wall Street Horizon subscription.
125130
'recent_earnings': '7689', # Recent Earnings - The date and time of the most recent earnings/earning call event. Requires Wall Street Horizon subscription.
126131
'recent_misc_event': '7690', # Recent Misc Event - The date and time of the most recent shareholder meeting, presentation, or other event. Requires Wall Street Horizon subscription.
132+
'morningstar_rating': '7655', # Morningstar Rating - Displays Morningstar Rating provided value. Requires Morningstar subscription.
133+
134+
# Dividends
135+
'dividends': '7671', # Dividends - This value is the total of the expected dividend payments over the next twelve months per share.
136+
'dividends_ttm': '7672', # Dividends TTM - This value is the total of the expected dividend payments over the last twelve months per share.
127137

128138
# Miscellaneous
139+
'can_be_traded': '7184', # canBeTraded - If contract is a trade-able instrument. Returns 1(true) or 0(false).
129140
'shortable': '7644', # Shortable - Describes the level of difficulty with which the security can be sold short.
130141
'service_params': '6508', # Service Params.
131142
'market_data_marker': '6119', # Marker for market data delivery method (similar to request id)

0 commit comments

Comments
 (0)