Skip to main content
Version: Upcoming

Schema: GetOptionPrice (ID: 3335)

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
103voldoublevolatility (will be SR surface volatility if not supplied)
106uPrcdoubleunderlying price
109yearsdoubleyears-to-expiration (default uses SR volatility time value)
112sdivdoublecontinuous stock dividend used for pricing
115ratedoublediscount rate used for pricing
118exTypeenum : ExerciseTypeexercise type of the option (American or European)
121exTimeenum : ExerciseTimeexercise time (AM or PM)
124holidayCalendarenum : CalendarCodeholiday calendar code (eg. NYSE)
127timeMetricenum : TimeMetrictime metric (D252, D365, etc.)
139prcFrameworkenum : PricingFramework
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)
151pricedoubleprice (premium)
154effStrikedoubleeffective strike used to for pricing calc
157iDaysintinterest days to expiry
160ddivfloatsum of discrete dividend amounts payable prior to exercise (if any) (simple; not net present value)
163ddivPVfloatsum of present value of discrete dividend amounts payable prior to exercise (if any)
166deltafloatdelta
169gammafloatgamma
172thetafloattheta
175vegafloatvega
178volgafloatvolga
181vannafloatvanna
184rhofloatrho
187phifloatphi
190deDecayfloatdelta decay
193errorstring(32)
196pricerModelstring(8)
199timestampDateTime

REPEATING FIELDS

DiscreteDividend

#FieldTypeDefault ValueComment
133dateDateTime
136amountfloat

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": "GetOptionPrice"
},
"message": {
"okey": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL",
"dt": "2025-01-01",
"xx": 1,
"cp": "Call"
},
"vol": 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, 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
"prcFramework": "enumValue", // enum(PricingFramework) - None, Spot, Forward, Future, Physical
"modelType": "enumValue", // enum(CalcModelType) - None, LogNormal, Normal
"calcEngine": "enumValue", // enum(CalcEngine) - None, FastHybrid, NumericLow, NumericStd, NumericMax
"incGreeks": "enumValue", // enum(YesNo) - None, Yes, No
"price": 1.0, // double
"effStrike": 1.0, // double
"iDays": 1, // int
"ddiv": 1.0, // float
"ddivPV": 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)