Schema: GetOptionVolatility (ID: 3340)
METADATA
Attribute | Value |
---|---|
Topic | 3325-mlink |
MLink Token | RiskCalc |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
197 | okey | OptionKey | can be listed or FLEX |
112 | price | double | option price (premium) |
115 | uPrc | double | underlying price |
118 | years | double | years-to-expiration (default uses SR volatility time value) |
121 | sdiv | double | continuous stock dividend used for pricing |
124 | rate | double | discount rate used for pricing |
127 | exType | enum : ExerciseType | exercise type of the option (American or European) |
130 | exTime | enum : ExerciseTime | exercise time (AM or PM) |
198 | holidayCalendar | enum : CalendarCode | holiday calendar code (eg. NYSE) |
133 | timeMetric | enum : TimeMetric | time metric (D252, D365, etc.) |
145 | modelType | enum : CalcModelType | |
148 | calcEngine | enum : CalcEngine | underlying calc engine: FastHybrid (listed strikes + SR discrtete dividends only). NumericX works for any strike/expiry + discrete dividend set but is significantly slower. |
151 | incGreeks | enum : YesNo | default (No) |
154 | vol | double | volatility (implied) |
157 | effStrike | double | effective strike used to for pricing calc |
160 | dividendAmount | float | sum of discrete dividend amounts payable prior to exercise (if any) (simple; not net present value) |
163 | delta | float | delta |
166 | gamma | float | gamma |
169 | theta | float | theta |
172 | vega | float | vega |
175 | volga | float | volga |
178 | vanna | float | vanna |
181 | deDecay | float | delta decay |
184 | rho | float | rho |
187 | phi | float | phi |
190 | error | string(32) | |
193 | pricerModel | string(8) | |
196 | timestamp | DateTime |
REPEATING FIELDS
DiscreteDividend
Field | Type | Comment |
---|---|---|
139 | date | DateTime |
142 | amount | float |
Post 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'
# Request Parameters
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'postmsgs',
"postaction": "I", # (I)nsert, or (R)eplace
"postmerge": "Y", # (Y)es or (N)o
}
payload = {
"header": {
"mTyp": "GetOptionVolatility"
},
"message": {
"okey": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL",
"dt": "2025-01-01",
"xx": 1,
"cp": "Call"
},
"price": 1.0, // double
"uPrc": 1.0, // double
"years": 1.0, // double
"sdiv": 1.0, // double
"rate": 1.0, // double
"exType": "enumValue", // enum(ExerciseType) - None, American, European, Asian, Cliquet
"exTime": "enumValue", // enum(ExerciseTime) - None, PM, AM
"holidayCalendar": "enumValue", // enum(CalendarCode) - None, NYSE, EUREX, CBOE_EU, NXAM, NXBR, NXLS, NXML, NXOS, NXP, ICEFE, CME, NYMEX, COMEX, MGEX, BXE, CXE, DXE, EUX
"timeMetric": "enumValue", // enum(TimeMetric) - None, D252, D365, SRV6
"modelType": "enumValue", // enum(CalcModelType) - None, LogNormalExact, NormalExact, LogNormalApprox, NormalApprox
"calcEngine": "enumValue", // enum(CalcEngine) - None, FastHybrid, NumericLow, NumericStd, NumericMax
"incGreeks": "enumValue", // enum(YesNo) - None, Yes, No
"vol": 1.0, // double
"effStrike": 1.0, // double
"dividendAmount": 1.0, // float
"delta": 1.0, // float
"gamma": 1.0, // float
"theta": 1.0, // float
"vega": 1.0, // float
"volga": 1.0, // float
"vanna": 1.0, // float
"deDecay": 1.0, // float
"rho": 1.0, // float
"phi": 1.0, // float
"error": "exampleString", // string
"pricerModel": "exampleString", // string
"timestamp": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"DiscreteDividend": [ // Repeating Field
{
"date": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"amount": 1.0 // float
}
]
}
}
response = requests.post(MLINK_PROD_URL, params=params, json=payload)
curl -X POST 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=postmsgs' \
--data-urlencode 'postaction=I' \ # (I)nsert, or (R)eplace
--data-urlencode 'postmerge=Y' \ # (Y)es or (N)o
--header 'Content-Type: application/json' \
--data '{
"header": {
"mTyp": "GetOptionVolatility"
},
"message": {
"okey": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL",
"dt": "2025-01-01",
"xx": 1,
"cp": "Call"
},
"price": 1.0, // double
"uPrc": 1.0, // double
"years": 1.0, // double
"sdiv": 1.0, // double
"rate": 1.0, // double
"exType": "enumValue", // enum(ExerciseType) - None, American, European, Asian, Cliquet
"exTime": "enumValue", // enum(ExerciseTime) - None, PM, AM
"holidayCalendar": "enumValue", // enum(CalendarCode) - None, NYSE, EUREX, CBOE_EU, NXAM, NXBR, NXLS, NXML, NXOS, NXP, ICEFE, CME, NYMEX, COMEX, MGEX, BXE, CXE, DXE, EUX
"timeMetric": "enumValue", // enum(TimeMetric) - None, D252, D365, SRV6
"modelType": "enumValue", // enum(CalcModelType) - None, LogNormalExact, NormalExact, LogNormalApprox, NormalApprox
"calcEngine": "enumValue", // enum(CalcEngine) - None, FastHybrid, NumericLow, NumericStd, NumericMax
"incGreeks": "enumValue", // enum(YesNo) - None, Yes, No
"vol": 1.0, // double
"effStrike": 1.0, // double
"dividendAmount": 1.0, // float
"delta": 1.0, // float
"gamma": 1.0, // float
"theta": 1.0, // float
"vega": 1.0, // float
"volga": 1.0, // float
"vanna": 1.0, // float
"deDecay": 1.0, // float
"rho": 1.0, // float
"phi": 1.0, // float
"error": "exampleString", // string
"pricerModel": "exampleString", // string
"timestamp": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"DiscreteDividend": [ // Repeating Field
{
"date": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"amount": 1.0 // float
}
]
}
}'