Skip to main content
Version: 8.6.9.2

Schema: AtsDegrossRevConGateway (ID: 5240)

Records inserted, updated, or replaced into this table are validated by the SRSE gateway and

converted to SpdrParentOrder (4095) records via ToSpdrParentOrder (parentOrderHandling=DegrossAuction,

orderLimitType=RcPrem). The 4095 is the only EE order ingress; this table is never consumed by the EE.

Each record is one order line: a single ticker/expiry RevCon package (1 call + 1 put + 100 shares per unit).

Strike and expiry are SR-controlled: resolved from the AtsDegrossAvailability (2357) expiry slot

addressed by groupingCode; never a client input.

METADATA​

AttributeValue
Topic5120-srse-gateway
MLink TokenClientTrading
MLink EndpointMLink-Live
SRSE ProductSRTrade

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

BODY​

#FieldTypeDefault ValueComment
10=tickerTickerKeyunderlier ticker (e.g., AAPL, TSLA)
11=expiryDateKeyflex option expiry date; must match the 2357 slot addressed by groupingCode
12=accntstring(16)SR trading account
13=sideenum : BuySellpackage side: Buy = shares out (degross a long book); Sell = shares in
14=clientFirmstring(16)
15=groupingCodelongexpiry slot 1-3 (= AtsDegrossAvailability (2357) block index = 4095 groupingCode); broker key for cancel/replace
100spdrActionTypeenum : SpdrActionTypeAdd, AddReplace, Cancel
110sizeintnumber of RevCon units (1 unit = 100 shares)
111rcLimitPricedoubleREQUIRED trader working R/C limit (package premium + strike, same space as BasketDegrossSubmit (6913)); rides 4095 orderPrcLimit verbatim under RcPrem: Buy = max premium to pay, Sell = min premium to receive; 0/unset, non-finite, or
140gatewayStatusenum : AtsRevConGatewayStatusgateway processing status
141rejectReasontext1if rejected, the reason why
142parentNumberlongassigned SpdrParentOrder number (if accepted)
150orderDttmDateTimeorder entry timestamp
151checksumshort13standard gateway checksum; must be set to 13
152userNamestring(24)set by server from context
153timestampDateTime
160riskGroupIdlong0basket id shared across the basket's orders; 0 = NOT in a risk group (per-order caps only); negative rejected. No server mint at this gateway - API callers supply their own basket ids
163balancedenum : YesNoNoYes = takeReachRule=BalanceOrNone on the 4095 (balanced election)
166maxCashOutdouble0basket cap: max aggregate cash out, rides rm1 as UserCap (0 = no cap; values above 2^24 rejected - float wire precision)
169maxCashIndouble0basket cap: max aggregate cash in, rides rm2 as UserCap (0 = no cap; same precision bound)
172maxTickerSharesint0per-ticker share budget, rides rm3 as UserCap (0 = availability-capped only)

Get Schema 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'

# Replace with your desired MsgType.
MSG_TYPE = 'AtsDegrossRevConGateway'

# 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)

Get Msg 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'

# Replace with your desired MsgType.
MSG_TYPE = 'AtsDegrossRevConGateway'

# 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 = 'spdrActionType|size|rcLimitPrice|gatewayStatus|rejectReason|parentNumber|orderDttm|checksum|userName|timestamp|riskGroupId|balanced|maxCashOut|maxCashIn|maxTickerShares'

# 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 = 'accnt:eq:ExampleString'

# 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)

Get 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'

# Replace with your desired MsgType.
MSG_TYPE = 'AtsDegrossRevConGateway'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'spdrActionType|size|rcLimitPrice|gatewayStatus|rejectReason|parentNumber|orderDttm|checksum|userName|timestamp|riskGroupId|balanced|maxCashOut|maxCashIn|maxTickerShares'

# 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 = 'accnt:eq:ExampleString'

# 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 = 'spdrActionType: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)

Get Aggregate 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'

# Replace with your desired MsgType.
MSG_TYPE = 'AtsDegrossRevConGateway'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'spdrActionType|size|rcLimitPrice|gatewayStatus|rejectReason|parentNumber|orderDttm|checksum|userName|timestamp|riskGroupId|balanced|maxCashOut|maxCashIn|maxTickerShares'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'spdrActionType|gatewayStatus|balanced'

# 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 = 'accnt:eq:ExampleString'

# 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)

Get Count 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'

# Replace with your desired MsgType.
MSG_TYPE = 'AtsDegrossRevConGateway'

# 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 = 'accnt:eq:ExampleString'

# 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)

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, (R)eplace, or (U)pdate
"postmerge": "Y", # (Y)es or (N)o
}

payload = {
"header": {
"mTyp": "AtsDegrossRevConGateway"
},
"message": {
"pkey": {
"ticker": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL"
},
"expiry": "2025-01-01", // yyyy-MM-dd
"accnt": "exampleString", // string
"side": "enumValue", // enum(BuySell) - None, Buy, Sell
"clientFirm": "exampleString", // string
"groupingCode": 1 // long
},
"spdrActionType": "enumValue", // enum(SpdrActionType) - Add, AddReplace, Replace, Cancel, Modify
"size": 1, // int
"rcLimitPrice": 1.0, // double
"gatewayStatus": "enumValue", // enum(AtsRevConGatewayStatus) - None, Pending, Accepted, Rejected
"rejectReason": "exampleString", // text1
"parentNumber": 1, // long
"orderDttm": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"checksum": 13, // short. Default=13
"userName": "exampleString", // string
"timestamp": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"riskGroupId": 0, // long. Default=0
"balanced": "No", // enum(YesNo) - None, Yes, No. Default=No
"maxCashOut": 0, // double. Default=0
"maxCashIn": 0, // double. Default=0
"maxTickerShares": 0 // int. Default=0
}
}

response = requests.post(MLINK_PROD_URL, params=params, json=payload)