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

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

REPEATING FIELDS

DiscreteDividend

FieldTypeComment
139dateDateTime
142amountfloat

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, 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
"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
"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)