Schema: LiveSurfaceCurve (ID: 1035)
LiveSurfaceCurve (surfaceType = 'Live') records are computed and publish continuously during trading hours and represent a current best implied volatility market fit.
SurfaceType = 'PriorDay' records contain the `closing surface record from the prior trading period (usually from just before the last main session close).
METADATA
Attribute | Value |
---|---|
Topic | 1000-analytics |
MLink Token | OptSurface |
SRSE Product | SRAnalytics |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | ekey | ExpiryKey | |
11= | surfaceType | enum : SurfaceCurveType | |
100 | ticker | TickerKey | underlying stock key that this option expiration attaches to |
103 | fkey | ExpiryKey | underlying future key (if any) |
106 | uPrcDriverKey | ExpiryKey | underlier driver key |
109 | uPrcDriverType | enum : SpdrKeyType | underlier driver key type (stock or future) |
112 | uPrcDriver | double | underlier driver (mid-market) |
115 | uPrc | double | effective uPrc used for surface fitting |
118 | uBid | double | effective uBid |
121 | uAsk | double | effective uAsk |
124 | years | float | time to expiration (in years) |
127 | rate | float | average interest rate to expiration (SR global rate curve) |
130 | sdiv | float | stock dividend (borrow rate) |
133 | ddiv | float | (expected) cumulative discrete dividend $ amounts prior to expiration |
136 | ddivPv | float | (expected) cumulative npv of discrete dividend $ amounts prior to expiration (SR global rate curve) |
139 | ddivSource | enum : DDivSource | Forecast if any of the dividends prior to expiry are forecast rather than announced |
142 | symbolRatio | float | underlier price ratio (usually 1.0 or a multi-hedge option price ratio; if one exists) |
145 | exType | enum : ExerciseType | exercise type (American or European) |
148 | modelType | enum : CalcModelType | option pricing model used for price calcs (Normal, LogNormal, etc.) |
151 | priceType | enum : CalcPriceType | Equity has independent sdiv and rate, Future has sdiv = rate |
154 | earnCnt | float | number of qualifying earnings events prior to expiration [can be fractional] (from StockEarningsCalendar) |
157 | earnCntAdj | float | number of qualifying earnings events prior to expiration [adjusted] (from StockEarningsCalendar + LiveSurfaceTerm) |
160 | axisVolRT | float | axis volatility x sqrt(years) (used to compute xAxis) [usually 4m atm vol] |
163 | axisFUPrc | float | axis FwdUPrc (fwd underlying price used to compute xAxis) |
164 | synSpot | double | Synthetic spot price (market-derived spot when the underlying is not a traded instrument) |
165 | synCarry | double | Synthetic carry rate; corresponds to the relationship between uPrc and synSpot (set when the underlying is not a traded instrument) |
166 | atmStrike | float | synthetic strike with cPrice = pPrice |
169 | moneynessType | enum : MoneynessType | moneyness (xAxis) convention |
172 | underlierMode | enum : UnderlierMode | underlier pricing mode (None=use spot/stock market; FrontMonth=use front month future market * uPrcRatio; Actual = use actual underlier future market) |
175 | cpAdjType | enum : CPAdjType | adjustment used to align calls/puts (if any) |
178 | priceQuoteType | enum : PriceQuoteType | Price or Vol |
181 | atmVol | float | atm vol (xAxis = 0) |
184 | atmCen | float | atm vol (xAxis = 0) (eMove/earnCntAdj censored) |
187 | atmVolHist | float | historical realized volatility (includes eMoveHist x earnCntAdj adjustment). Note that this is the default atmVol if no implied markets existed previous day. |
190 | atmCenHist | float | censored (earnings events removed) historical realized volatility. Trailing periods is 2x forward time to expiration. From HistoricalVolatility(windowType=hlCen).mv_nnn |
193 | eMove | float | implied earnings move (from LiveSurfaceTerm) |
196 | eMoveHist | float | historical earnings move (avg of trailing 8 moves). From StockEarningsCalendar.eMoveHist |
199 | uPrcRatio | double | uPrcAdj = uPrc * uPrcRatioFit |
202 | minAtmVol | float | minimum estimated atm vol |
205 | maxAtmVol | float | maximum estimated atm vol |
208 | minCPAdjVal | double | minimum cpAdjVal (sdiv or uPrcRatio) |
211 | maxCPAdjVal | double | minimum cpAdjVal (sdiv or uPrcRatio) |
214 | atmFixedMove | float | fixed strike atm move from prior period |
217 | atmPhi | float | surface phi @ xAxis = 0 |
220 | atmRho | float | surface rho @ xAxis = 0 |
223 | atmVega | float | surface vega @ xAxis = 0 |
226 | slope | float | volatility surface slope (dVol / dXAxis) @ ATM (xAxis=0) |
229 | varSwapFV | float | variance swap fair value (estimated by numerical integration over OTM price surface) |
232 | gridType | enum : GridType | gridType defines skew curve coeff points + spline type |
235 | knotShift | float | constant that should be added to each base knot location [-3.0 - +3.0] |
238 | fitPowerC | float | fit power of the vol fit (call wing) |
241 | fitPowerP | float | fit power of the vol fit (put wing) |
244 | minXAxis | float | minimum xAxis value; xAxis values to the left extrapolate horizontally |
247 | maxXAxis | float | maximum xAxis value; xAxis values to the right extrapolate horizontally |
250 | asymptoticVolC | float | asymptotic volatility (call wing) |
253 | asymptoticVolP | float | asymptotic volatility (put wing) |
256 | minCurvValue | float | minimum curvature (2nd derivative) of skew curve (can be negative if curve is not strictly convex) |
259 | minCurvXAxis | float | xAxis of minimum curvature point |
262 | maxCurvValue | float | maximum curvature (2nd derivative) of skew curve |
265 | maxCurvXAxis | float | xAxis of maximum curvature point |
268 | skewMinX | float | xAxis = (effStrike / effAxisFUPrc - 1.0) / axisVolRT; effStrike = strike * strikeRatio; effAxisFUPrc = axisFUPrc * symbolRatio |
271 | skewMinY | float | skewMinX / skewMinY are the skew curve minimum point (usually a positive x value and a negative y value) |
274 | surfaceFit | enum : SurfaceFit | |
277 | skewC00 | float | curve coeff[0] |
280 | skewC01 | float | curve coeff[1] |
283 | skewC02 | float | |
286 | skewC03 | float | |
289 | skewC04 | float | |
292 | skewC05 | float | |
295 | skewC06 | float | |
298 | skewC07 | float | |
301 | skewC08 | float | |
304 | skewC09 | float | |
307 | skewC10 | float | |
310 | skewC11 | float | |
313 | skewC12 | float | |
316 | skewC13 | float | |
319 | skewC14 | float | |
322 | skewC15 | float | |
325 | skewC16 | float | |
328 | skewC17 | float | |
331 | skewC18 | float | |
334 | skewC19 | float | |
337 | skewC20 | float | |
340 | skewC21 | float | |
343 | skewC22 | float | |
346 | skewC23 | float | |
349 | skewC24 | float | |
352 | skewC25 | float | |
355 | skewC26 | float | |
358 | skewC27 | float | |
361 | skewC28 | float | |
364 | ivAdjD07 | float | xAxis = -5.0 |
367 | ivAdjD06 | float | xAxis = -4.0 |
370 | ivAdjD05 | float | xAxis = -3.0 |
373 | ivAdjD04 | float | xAxis = -2.0 |
376 | ivAdjD03 | float | xAxis = -1.5 |
379 | ivAdjD02 | float | xAxis = -1.0 |
382 | ivAdjD01 | float | xAxis = -0.5 |
385 | ivAdjU01 | float | xAxis = +0.5 |
388 | ivAdjU02 | float | xAxis = +1.0 |
391 | ivAdjU03 | float | xAxis = +1.5 |
394 | ivAdjU04 | float | xAxis = +2.0 |
397 | ivAdjU05 | float | xAxis = +3.0 |
400 | ivAdjU06 | float | xAxis = +4.0 |
403 | ivAdjU07 | float | xAxis = +5.0 |
406 | cpAdjD04 | float | xAxis = -4.0 |
409 | cpAdjD03 | float | xAxis = -3.0 |
412 | cpAdjD02 | float | xAxis = -2.0 |
415 | cpAdjD01 | float | xAxis = -1.0 |
418 | cpAdjU01 | float | xAxis = +1.0 |
421 | cpAdjU02 | float | xAxis = +2.0 |
424 | cpAdjU03 | float | xAxis = +3.0 |
427 | cpAdjU04 | float | xAxis = +4.0 |
430 | pwidth | float | minimum mkt premium width |
433 | vwidth | float | minimum mkt volatility width |
436 | cCnt | byte | num call strikes in base fit |
439 | pCnt | byte | num put strikes in base fit |
442 | cBidMiss | byte | number of call bid violations (surface outside the market) |
445 | cAskMiss | byte | number of call ask violations (surface outside the market) |
448 | pBidMiss | byte | number of put bid violations |
451 | pAskMiss | byte | number of put ask violations |
454 | fitAvgErr | float | average error (sPrc - midPrc) |
457 | fitAvgAbsErr | float | average absolute error (sPrc - midPrc) |
460 | fitMaxPrcErr | float | worst case surface premium violation |
463 | fitErrXX | float | okey_xx of the option with the largest fit error in this expiration |
466 | fitErrCP | enum : CallPut | okey_cp of the option with the largest fit error in this expiration |
469 | fitErrDe | float | delta of fixErrXX |
472 | fitErrBid | float | bid of the option with the largest fit error |
475 | fitErrAsk | float | ask of the option with the largest fit error |
478 | fitErrPrc | float | surface prc of the option with the largest fit error |
481 | fitErrVol | float | surface vol of the option with the largest fit error |
484 | numSaddlePts | byte | number of saddle points |
487 | minSaddleSpan | float | smallest distance between saddle points |
490 | maxSaddleCurvature | float | maximum saddle point curvature |
493 | skewCounter | int | skew surface fit counter |
496 | sdivCounter | int | sdiv surface fit counter |
515 | tradingSession | enum : TradingSession | trading session this surface is from |
502 | tradeableStatus | enum : TradeableStatus | indicates whether the surface is currently tradeable or not (all server surface integrity checks pass) |
505 | surfaceResult | enum : SurfaceResult | |
508 | sTimestamp | DateTime | last surface curve fit timestamp |
511 | time | TimeSpan | |
514 | timestamp | DateTime |
Get Schema 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'
# Replace with your desired MsgType.
MSG_TYPE = 'LiveSurfaceCurve'
# Request Parameters for Get Schema Of The MsgType
params = {
#Required Parameters
"apiKey": API_KEY,
"cmd": 'getschema',
"msgType": MSG_TYPE,
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getschema' \
--data-urlencode 'msgType=LiveSurfaceCurve'
Get Msg 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'
# Replace with your desired MsgType.
MSG_TYPE = 'LiveSurfaceCurve'
# Replace with your pkey value for getting the specific message desired
PKEY = 'ReplaceThisValueForTheQueryToWork'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned.
VIEW = 'ticker|fkey|uPrcDriverKey|uPrcDriverType|uPrcDriver|uPrc|uBid|uAsk|years|rate|sdiv|ddiv|ddivPv|ddivSource|symbolRatio|exType|modelType|priceType|earnCnt|earnCntAdj|axisVolRT|axisFUPrc|synSpot|synCarry|atmStrike|moneynessType|underlierMode|cpAdjType|priceQuoteType|atmVol|atmCen|atmVolHist|atmCenHist|eMove|eMoveHist|uPrcRatio|minAtmVol|maxAtmVol|minCPAdjVal|maxCPAdjVal|atmFixedMove|atmPhi|atmRho|atmVega|slope|varSwapFV|gridType|knotShift|fitPowerC|fitPowerP|minXAxis|maxXAxis|asymptoticVolC|asymptoticVolP|minCurvValue|minCurvXAxis|maxCurvValue|maxCurvXAxis|skewMinX|skewMinY|surfaceFit|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|ivAdjD07|ivAdjD06|ivAdjD05|ivAdjD04|ivAdjD03|ivAdjD02|ivAdjD01|ivAdjU01|ivAdjU02|ivAdjU03|ivAdjU04|ivAdjU05|ivAdjU06|ivAdjU07|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|pwidth|vwidth|cCnt|pCnt|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitAvgErr|fitAvgAbsErr|fitMaxPrcErr|fitErrXX|fitErrCP|fitErrDe|fitErrBid|fitErrAsk|fitErrPrc|fitErrVol|numSaddlePts|minSaddleSpan|maxSaddleCurvature|skewCounter|sdivCounter|tradingSession|tradeableStatus|surfaceResult|sTimestamp|time|timestamp'
# Replace with your desired where clause.
# a string in the form "field1:eq:valuse" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = ''
# Request Parameters for getmsg Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsg',
"pkey": PKEY,
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsg' \
--data-urlencode 'pkey=ReplaceThisValueForTheQueryToWork' \
--data-urlencode 'msgType=LiveSurfaceCurve' \
--data-urlencode 'view=ticker|fkey|uPrcDriverKey|uPrcDriverType|uPrcDriver|uPrc|uBid|uAsk|years|rate|sdiv|ddiv|ddivPv|ddivSource|symbolRatio|exType|modelType|priceType|earnCnt|earnCntAdj|axisVolRT|axisFUPrc|synSpot|synCarry|atmStrike|moneynessType|underlierMode|cpAdjType|priceQuoteType|atmVol|atmCen|atmVolHist|atmCenHist|eMove|eMoveHist|uPrcRatio|minAtmVol|maxAtmVol|minCPAdjVal|maxCPAdjVal|atmFixedMove|atmPhi|atmRho|atmVega|slope|varSwapFV|gridType|knotShift|fitPowerC|fitPowerP|minXAxis|maxXAxis|asymptoticVolC|asymptoticVolP|minCurvValue|minCurvXAxis|maxCurvValue|maxCurvXAxis|skewMinX|skewMinY|surfaceFit|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|ivAdjD07|ivAdjD06|ivAdjD05|ivAdjD04|ivAdjD03|ivAdjD02|ivAdjD01|ivAdjU01|ivAdjU02|ivAdjU03|ivAdjU04|ivAdjU05|ivAdjU06|ivAdjU07|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|pwidth|vwidth|cCnt|pCnt|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitAvgErr|fitAvgAbsErr|fitMaxPrcErr|fitErrXX|fitErrCP|fitErrDe|fitErrBid|fitErrAsk|fitErrPrc|fitErrVol|numSaddlePts|minSaddleSpan|maxSaddleCurvature|skewCounter|sdivCounter|tradingSession|tradeableStatus|surfaceResult|sTimestamp|time|timestamp' \
--data-urlencode 'where='
Get 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'
# Replace with your desired MsgType.
MSG_TYPE = 'LiveSurfaceCurve'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'ticker|fkey|uPrcDriverKey|uPrcDriverType|uPrcDriver|uPrc|uBid|uAsk|years|rate|sdiv|ddiv|ddivPv|ddivSource|symbolRatio|exType|modelType|priceType|earnCnt|earnCntAdj|axisVolRT|axisFUPrc|synSpot|synCarry|atmStrike|moneynessType|underlierMode|cpAdjType|priceQuoteType|atmVol|atmCen|atmVolHist|atmCenHist|eMove|eMoveHist|uPrcRatio|minAtmVol|maxAtmVol|minCPAdjVal|maxCPAdjVal|atmFixedMove|atmPhi|atmRho|atmVega|slope|varSwapFV|gridType|knotShift|fitPowerC|fitPowerP|minXAxis|maxXAxis|asymptoticVolC|asymptoticVolP|minCurvValue|minCurvXAxis|maxCurvValue|maxCurvXAxis|skewMinX|skewMinY|surfaceFit|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|ivAdjD07|ivAdjD06|ivAdjD05|ivAdjD04|ivAdjD03|ivAdjD02|ivAdjD01|ivAdjU01|ivAdjU02|ivAdjU03|ivAdjU04|ivAdjU05|ivAdjU06|ivAdjU07|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|pwidth|vwidth|cCnt|pCnt|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitAvgErr|fitAvgAbsErr|fitMaxPrcErr|fitErrXX|fitErrCP|fitErrDe|fitErrBid|fitErrAsk|fitErrPrc|fitErrVol|numSaddlePts|minSaddleSpan|maxSaddleCurvature|skewCounter|sdivCounter|tradingSession|tradeableStatus|surfaceResult|sTimestamp|time|timestamp'
# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = ''
# Replace with your desired limit of how many messages you receive. The default limit is 500
LIMIT = 500
# Order clause eg. "(field1:DESC | field1:ASC | field2:DESC:ABS | field2:ASC:ABS" (default is unordered; default is faster)
ORDER = 'ticker:ASC'
# Request Parameters for getmsgs Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsgs',
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE,
"limit": LIMIT,
"order": ORDER
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsgs' \
--data-urlencode 'msgType=LiveSurfaceCurve' \
--data-urlencode 'view=ticker|fkey|uPrcDriverKey|uPrcDriverType|uPrcDriver|uPrc|uBid|uAsk|years|rate|sdiv|ddiv|ddivPv|ddivSource|symbolRatio|exType|modelType|priceType|earnCnt|earnCntAdj|axisVolRT|axisFUPrc|synSpot|synCarry|atmStrike|moneynessType|underlierMode|cpAdjType|priceQuoteType|atmVol|atmCen|atmVolHist|atmCenHist|eMove|eMoveHist|uPrcRatio|minAtmVol|maxAtmVol|minCPAdjVal|maxCPAdjVal|atmFixedMove|atmPhi|atmRho|atmVega|slope|varSwapFV|gridType|knotShift|fitPowerC|fitPowerP|minXAxis|maxXAxis|asymptoticVolC|asymptoticVolP|minCurvValue|minCurvXAxis|maxCurvValue|maxCurvXAxis|skewMinX|skewMinY|surfaceFit|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|ivAdjD07|ivAdjD06|ivAdjD05|ivAdjD04|ivAdjD03|ivAdjD02|ivAdjD01|ivAdjU01|ivAdjU02|ivAdjU03|ivAdjU04|ivAdjU05|ivAdjU06|ivAdjU07|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|pwidth|vwidth|cCnt|pCnt|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitAvgErr|fitAvgAbsErr|fitMaxPrcErr|fitErrXX|fitErrCP|fitErrDe|fitErrBid|fitErrAsk|fitErrPrc|fitErrVol|numSaddlePts|minSaddleSpan|maxSaddleCurvature|skewCounter|sdivCounter|tradingSession|tradeableStatus|surfaceResult|sTimestamp|time|timestamp' \
--data-urlencode 'where=' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=ticker:ASC'
Get Aggregate 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'
# Replace with your desired MsgType.
MSG_TYPE = 'LiveSurfaceCurve'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'ticker|fkey|uPrcDriverKey|uPrcDriverType|uPrcDriver|uPrc|uBid|uAsk|years|rate|sdiv|ddiv|ddivPv|ddivSource|symbolRatio|exType|modelType|priceType|earnCnt|earnCntAdj|axisVolRT|axisFUPrc|synSpot|synCarry|atmStrike|moneynessType|underlierMode|cpAdjType|priceQuoteType|atmVol|atmCen|atmVolHist|atmCenHist|eMove|eMoveHist|uPrcRatio|minAtmVol|maxAtmVol|minCPAdjVal|maxCPAdjVal|atmFixedMove|atmPhi|atmRho|atmVega|slope|varSwapFV|gridType|knotShift|fitPowerC|fitPowerP|minXAxis|maxXAxis|asymptoticVolC|asymptoticVolP|minCurvValue|minCurvXAxis|maxCurvValue|maxCurvXAxis|skewMinX|skewMinY|surfaceFit|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|ivAdjD07|ivAdjD06|ivAdjD05|ivAdjD04|ivAdjD03|ivAdjD02|ivAdjD01|ivAdjU01|ivAdjU02|ivAdjU03|ivAdjU04|ivAdjU05|ivAdjU06|ivAdjU07|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|pwidth|vwidth|cCnt|pCnt|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitAvgErr|fitAvgAbsErr|fitMaxPrcErr|fitErrXX|fitErrCP|fitErrDe|fitErrBid|fitErrAsk|fitErrPrc|fitErrVol|numSaddlePts|minSaddleSpan|maxSaddleCurvature|skewCounter|sdivCounter|tradingSession|tradeableStatus|surfaceResult|sTimestamp|time|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'uPrcDriverType|ddivSource|exType|modelType|priceType|moneynessType|underlierMode|cpAdjType|priceQuoteType|gridType|surfaceFit|fitErrCP|tradingSession|tradeableStatus|surfaceResult'
# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = ''
# Request Parameters for getaggregate Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getaggregate',
"msgType": MSG_TYPE,
"measure": MEASURE,
"group": GROUP,
# Optional Parameters
"where": WHERE,
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getaggregate' \
--data-urlencode 'msgType=LiveSurfaceCurve' \
--data-urlencode 'measure=ticker|fkey|uPrcDriverKey|uPrcDriverType|uPrcDriver|uPrc|uBid|uAsk|years|rate|sdiv|ddiv|ddivPv|ddivSource|symbolRatio|exType|modelType|priceType|earnCnt|earnCntAdj|axisVolRT|axisFUPrc|synSpot|synCarry|atmStrike|moneynessType|underlierMode|cpAdjType|priceQuoteType|atmVol|atmCen|atmVolHist|atmCenHist|eMove|eMoveHist|uPrcRatio|minAtmVol|maxAtmVol|minCPAdjVal|maxCPAdjVal|atmFixedMove|atmPhi|atmRho|atmVega|slope|varSwapFV|gridType|knotShift|fitPowerC|fitPowerP|minXAxis|maxXAxis|asymptoticVolC|asymptoticVolP|minCurvValue|minCurvXAxis|maxCurvValue|maxCurvXAxis|skewMinX|skewMinY|surfaceFit|skewC00|skewC01|skewC02|skewC03|skewC04|skewC05|skewC06|skewC07|skewC08|skewC09|skewC10|skewC11|skewC12|skewC13|skewC14|skewC15|skewC16|skewC17|skewC18|skewC19|skewC20|skewC21|skewC22|skewC23|skewC24|skewC25|skewC26|skewC27|skewC28|ivAdjD07|ivAdjD06|ivAdjD05|ivAdjD04|ivAdjD03|ivAdjD02|ivAdjD01|ivAdjU01|ivAdjU02|ivAdjU03|ivAdjU04|ivAdjU05|ivAdjU06|ivAdjU07|cpAdjD04|cpAdjD03|cpAdjD02|cpAdjD01|cpAdjU01|cpAdjU02|cpAdjU03|cpAdjU04|pwidth|vwidth|cCnt|pCnt|cBidMiss|cAskMiss|pBidMiss|pAskMiss|fitAvgErr|fitAvgAbsErr|fitMaxPrcErr|fitErrXX|fitErrCP|fitErrDe|fitErrBid|fitErrAsk|fitErrPrc|fitErrVol|numSaddlePts|minSaddleSpan|maxSaddleCurvature|skewCounter|sdivCounter|tradingSession|tradeableStatus|surfaceResult|sTimestamp|time|timestamp' \
--data-urlencode 'group=uPrcDriverType|ddivSource|exType|modelType|priceType|moneynessType|underlierMode|cpAdjType|priceQuoteType|gridType|surfaceFit|fitErrCP|tradingSession|tradeableStatus|surfaceResult' \
--data-urlencode 'where='
Get Count 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'
# Replace with your desired MsgType.
MSG_TYPE = 'LiveSurfaceCurve'
# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = ''
# Request Parameters for getCount Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getcount',
"msgType": MSG_TYPE,
# Optional Parameters
"where": WHERE,
}
response = requests.get(MLINK_PROD_URL, params=params)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getcount' \
--data-urlencode 'msgType=LiveSurfaceCurve' \
--data-urlencode 'where='