Schema: GetOptionPrice (ID: 3335)
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 | Default Value | Comment |
|---|---|---|---|---|
| 200 | okey | OptionKey | can be listed or FLEX | |
| 202 | vol | double | volatility (will be SR surface volatility if not supplied) | |
| 115 | uPrc | double | underlying price | |
| 118 | years | double | years-to-expiration (default uses SR volatility time value) | |
| 203 | sdiv | double | continuous stock dividend used for pricing | |
| 204 | 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) | |
| 201 | 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 | price | double | price (premium) | |
| 157 | effStrike | double | effective strike used to for pricing calc | |
| 197 | iDays | int | interest days to expiry | |
| 198 | ddiv | float | sum of discrete dividend amounts payable prior to exercise (if any) (simple; not net present value) | |
| 199 | ddivPV | float | sum of present value of discrete dividend amounts payable prior to exercise (if any) | |
| 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 | Default Value | 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": "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
"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)
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": "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
"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
}
]
}
}'