Skip to main content
Version: Upcoming

Schema: GetOptionVolatility (ID: 3340)

METADATA

AttributeValue
Topic3325-mlink
MLink TokenRiskCalc

Note: The symbol = next to a field number indicates that it is a primary key.

BODY

#FieldTypeDefault ValueComment
100okeyOptionKeycan be listed or FLEX
103pricedoubleoption price (premium)
106uPrcdoubleunderlying price
109yearsdoubleyears-to-expiration (default uses SR volatility time value)
112sdivdoublecontinuous stock dividend used for pricing
115ratedoublediscount rate used for pricing
118prcFrameworkenum : PricingFrameworkprimarily controls exercise/settlement interest effects
121exTypeenum : ExerciseTypeexercise type of the option (American or European)
124exTimeenum : ExerciseTimeexercise time (AM or PM)
127holidayCalendarenum : CalendarCodeholiday calendar code (eg. NYSE)
130timeMetricenum : TimeMetrictime metric (D252, D365, etc.)
142modelTypeenum : CalcModelType
145calcEngineenum : CalcEngineunderlying calc engine: FastHybrid (listed strikes + SR discrtete dividends only). NumericX works for any strike/expiry + discrete dividend set but is significantly slower.
148incGreeksenum : YesNodefault (No)
151voldoublevolatility (implied)
154effStrikedoubleeffective strike used to for pricing calc
157dividendAmountfloatsum of discrete dividend amounts payable prior to exercise (if any) (simple; not net present value)
160deltafloatdelta
163gammafloatgamma
166thetafloattheta
169vegafloatvega
172volgafloatvolga
175vannafloatvanna
178rhofloatrho
181phifloatphi
184deDecayfloatdelta decay
187errorstring(32)
190pricerModelstring(8)
193timestampDateTime

REPEATING FIELDS

DiscreteDividend

#FieldTypeDefault ValueComment
136dateDateTime
139amountfloat

Post Msgs API Call

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
"prcFramework": "enumValue", // enum(PricingFramework) - None, Spot, Forward, Future, Physical
"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, SCE, EU_AT, EU_BE, EU_CH, EU_DE, EU_DK, EU_FI, EU_FR, EU_GB, EU_IE, EU_IT, EU_NL, EU_NO, EU_PT, EU_SE
"timeMetric": "enumValue", // enum(TimeMetric) - None, D252, D365, SRV6
"modelType": "enumValue", // enum(CalcModelType) - None, LogNormal, Normal
"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
"rho": 1.0, // float
"phi": 1.0, // float
"deDecay": 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)