Schema: IndexDefinitionV3 (ID: 9109)
THE INDEX KEY IS THE LINE: every root and ccode that settles on this index points at this key, its live level
rides on IndexQuote (2675) under it, and the facts a share line carries on EquityDefinitionV3 (9106) an index
line carries here. A key with a row here and no 9106 row is an index line. {Component} is what the index is
composed OF; indexType says which kind of composed-of line this is. A DERIVED line names what it derives from in
baseIndex and how in derivation, and has no components. Another calculator's level arrives under a
QUOTE PATH: a market-data key whose TickerKeyDefinitionV3 (9100) row is symbolType IndexQuote and up-links
here, with no row here and no complex. The official SOQ and close are IndexSettlementMark (3185) rows.
A DELIVERY BASKET is DeliveryBasketDefinitionV3 (9169), not a row here. indexType DeliveryBasket is retired in
place: no producer writes it and the bridge check names a row that still carries it.
A DIVIDEND LINE has derivation DividendPoints: its level is the gross cash dividends of baseIndex since the
annual reset, in index points. An index's is the provider's published index under its own symbol; a share's
is minted by SR, keyed '~' + the share's symbol. Every dividend future names it as ticker, never the share or
price index - a dividend contract is not a share delta. indexType Dividend is retired in place.
METADATA
| Attribute | Value |
|---|---|
| Topic | 9100-product-def-core |
| MLink Token | EquityDefinition |
| MLink Endpoint | MLink-Live |
| SRSE Product | SRReference |
Note: The symbol
=next to a field number indicates that it is a primary key.
BODY
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 10= | ticker | TickerKey | ||
| 100 | indexType | enum : IndexType | ||
| 103 | name | string(32) | ||
| 118 | divisor | double | the index divisor; absorbs corp actions and constituent changes | |
| 121 | baseLevel | double | ||
| 124 | baseDate | DateKey | ||
| 127 | flexTypeFlag | flag : FlexTypeFlag | FLEX series types that may be MINTED on this underlier; None = no FLEX. A FLEX order mints a root before any root exists | |
| 130 | priceFormat | enum : PriceFormat | how the level quotes | |
| 133 | minTickSize | double | the level's smallest increment | |
| 136 | pointValue | float | the index multiplier; 0 reads as 1 | |
| 139 | pointCurrency | string(3) | empty = the spine's primaryCurrency | |
| 142 | tradingPeriod | enum : TradingPeriod | -> TradingPeriodDefinitionV3 9015 | |
| 145 | scheduleGroup | string(6) | -> ScheduleDefinitionV3 9057; empty = '*' | |
| 148 | hasOptions | enum : YesNo | HINT: subscription filter only - may lag the collection | |
| 151 | defaultRoot | TickerKey | the root the tools open by default | |
| 154 | linkedPrimaryFuture | TickerKey | the future whose expiry bars drive this index's option chains | |
| 181 | cashPerUnit | double | retired with indexType DeliveryBasket; a basket's cash is RootDefinitionV3.cashOnExercise | |
| 178 | timestamp | DateTime | ||
| 900 | v3Source | enum : V3Source | ||
| 184 | baseIndex | TickerKey | the index or share line this level derives from; empty for a composed or published level | |
| 187 | derivation | enum : IndexDerivation | how the level derives from baseIndex; None = not derived |
REPEATING FIELDS
Component
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 109 | symbol | TickerKey | ||
| 112 | weight | float | ||
| 115 | weightType | enum : IndexWeightType |
QuotePath
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 160 | quoteKey | TickerKey | the key the level arrives under (IndexQuote 2675); its spine row is IndexQuote, up-linking here | |
| 163 | kind | enum : QuotePathKind | ||
| 166 | source | string(16) | who publishes or computes it: an exchange or calculator code, or SR | |
| 169 | method | enum : QuotePathMethod | Model paths: how the level is built | |
| 172 | sourceTicker | TickerKey | Model paths: the ETF, index or root set the components are drawn from | |
| 175 | formula | string(128) | Model paths: the expression, where method needs one |
Get Schema API Call
- Python
- cUrl
import requests
# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'
# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'
# Replace with your desired MsgType.
MSG_TYPE = 'IndexDefinitionV3'
# Request Parameters for Get Schema Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getschema',
"msgType": MSG_TYPE,
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getschema' \
--data-urlencode 'msgType=IndexDefinitionV3'
Get Msg API Call
- Python
- cUrl
import requests
# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'
# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'
# Replace with your desired MsgType.
MSG_TYPE = 'IndexDefinitionV3'
# Replace with your pkey value for getting the specific message desired
PKEY = 'ReplaceThisValueForTheQueryToWork'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned.
VIEW = 'indexType|name|divisor|baseLevel|baseDate|flexTypeFlag|priceFormat|minTickSize|pointValue|pointCurrency|tradingPeriod|scheduleGroup|hasOptions|defaultRoot|linkedPrimaryFuture|cashPerUnit|timestamp|v3Source|baseIndex|derivation'
# Replace with your desired where clause.
# a string in the form "field1:eq:valuse" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'name:eq:ExampleString'
# Request Parameters for getmsg Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsg',
"pkey": PKEY,
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsg' \
--data-urlencode 'pkey=ReplaceThisValueForTheQueryToWork' \
--data-urlencode 'msgType=IndexDefinitionV3' \
--data-urlencode 'view=indexType|name|divisor|baseLevel|baseDate|flexTypeFlag|priceFormat|minTickSize|pointValue|pointCurrency|tradingPeriod|scheduleGroup|hasOptions|defaultRoot|linkedPrimaryFuture|cashPerUnit|timestamp|v3Source|baseIndex|derivation' \
--data-urlencode 'where=name:eq:ExampleString'
Get Msgs API Call
- Python
- cUrl
import requests
# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'
# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'
# Replace with your desired MsgType.
MSG_TYPE = 'IndexDefinitionV3'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'indexType|name|divisor|baseLevel|baseDate|flexTypeFlag|priceFormat|minTickSize|pointValue|pointCurrency|tradingPeriod|scheduleGroup|hasOptions|defaultRoot|linkedPrimaryFuture|cashPerUnit|timestamp|v3Source|baseIndex|derivation'
# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'name:eq:ExampleString'
# Replace with your desired limit of how many messages you receive. The default limit is 500
LIMIT = 500
# Order clause eg. "(field1:DESC | field1:ASC | field2:DESC:ABS | field2:ASC:ABS" (default is unordered; default is faster)
ORDER = 'indexType:ASC'
# Request Parameters for getmsgs Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsgs',
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE,
"limit": LIMIT,
"order": ORDER
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsgs' \
--data-urlencode 'msgType=IndexDefinitionV3' \
--data-urlencode 'view=indexType|name|divisor|baseLevel|baseDate|flexTypeFlag|priceFormat|minTickSize|pointValue|pointCurrency|tradingPeriod|scheduleGroup|hasOptions|defaultRoot|linkedPrimaryFuture|cashPerUnit|timestamp|v3Source|baseIndex|derivation' \
--data-urlencode 'where=name:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=indexType:ASC'
Get Aggregate API Call
- Python
- cUrl
import requests
# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'
# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'
# Replace with your desired MsgType.
MSG_TYPE = 'IndexDefinitionV3'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'indexType|name|divisor|baseLevel|baseDate|flexTypeFlag|priceFormat|minTickSize|pointValue|pointCurrency|tradingPeriod|scheduleGroup|hasOptions|defaultRoot|linkedPrimaryFuture|cashPerUnit|timestamp|v3Source|baseIndex|derivation'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'indexType|priceFormat|tradingPeriod|hasOptions|v3Source|derivation'
# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'name:eq:ExampleString'
# Request Parameters for getaggregate Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getaggregate',
"msgType": MSG_TYPE,
"measure": MEASURE,
"group": GROUP,
# Optional Parameters
"where": WHERE,
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getaggregate' \
--data-urlencode 'msgType=IndexDefinitionV3' \
--data-urlencode 'measure=indexType|name|divisor|baseLevel|baseDate|flexTypeFlag|priceFormat|minTickSize|pointValue|pointCurrency|tradingPeriod|scheduleGroup|hasOptions|defaultRoot|linkedPrimaryFuture|cashPerUnit|timestamp|v3Source|baseIndex|derivation' \
--data-urlencode 'group=indexType|priceFormat|tradingPeriod|hasOptions|v3Source|derivation' \
--data-urlencode 'where=name:eq:ExampleString'
Get Count API Call
- Python
- cUrl
import requests
# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'
# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'
# Replace with your desired MsgType.
MSG_TYPE = 'IndexDefinitionV3'
# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'name:eq:ExampleString'
# Request Parameters for getCount Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getcount',
"msgType": MSG_TYPE,
# Optional Parameters
"where": WHERE,
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getcount' \
--data-urlencode 'msgType=IndexDefinitionV3' \
--data-urlencode 'where=name:eq:ExampleString'