Skip to main content
Version: Upcoming

Schema: SecDefRequestGateway (ID: 5190)

METADATA

AttributeValue
Topic5120-srse-gateway
MLink TokenInternal
SRSE ProductSRTrade

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

BODY

#FieldTypeComment
10=secRequestIDlong
100secDefTypeenum : SecDefType
103accntstring(16)routing code of exchange session handling product def request
476clientFirmstring(16)
106altRequestIdstring(24)Alternate request ID. Can by used by client for tracking
109secKey1OptionKeySymbol for leg #1. Must be a valid symbol.
112secType1enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
115ratio1ushortRatio for leg #1. Must be greater than zero.
118side1enum : BuySellOrder side for leg #1.
121refPrc1doubleReference price for leg #1.
124refDelta1floatReference delta for leg #1.
127secKey2OptionKeySymbol for leg #2. Must be a valid symbol.
130secType2enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
133ratio2ushortRatio for leg #2. Must be greater than zero.
136side2enum : BuySellOrder side for leg #2.
139refPrc2doubleReference price for leg #2.
142refDelta2floatReference delta for leg #2.
145secKey3OptionKeySymbol for leg #3. Must be a valid symbol.
148secType3enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
151ratio3ushortRatio for leg #3. Must be greater than zero.
154side3enum : BuySellOrder side for leg #3.
157refPrc3doubleReference price for leg #3.
160refDelta3floatReference delta for leg #3.
163secKey4OptionKeySymbol for leg #4. Must be a valid symbol.
166secType4enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
169ratio4ushortRatio for leg #4. Must be greater than zero.
172side4enum : BuySellOrder side for leg #4.
175refPrc4doubleReference price for leg #4.
178refDelta4floatReference delta for leg #4.
181secKey5OptionKeySymbol for leg #5. Must be a valid symbol.
184secType5enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
187ratio5ushortRatio for leg #5. Must be greater than zero.
190side5enum : BuySellOrder side for leg #5.
193refPrc5doubleReference price for leg #5.
196refDelta5floatReference delta for leg #5.
199secKey6OptionKeySymbol for leg #6. Must be a valid symbol.
202secType6enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
205ratio6ushortRatio for leg #6. Must be greater than zero.
208side6enum : BuySellOrder side for leg #6.
211refPrc6doubleReference price for leg #6.
214refDelta6floatReference delta for leg #6.
217secKey7OptionKeySymbol for leg #7. Must be a valid symbol.
220secType7enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
223ratio7ushortRatio for leg #7. Must be greater than zero.
226side7enum : BuySellOrder side for leg #7.
229refPrc7doubleReference price for leg #7.
232refDelta7floatReference delta for leg #7.
235secKey8OptionKeySymbol for leg #8. Must be a valid symbol.
238secType8enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
241ratio8ushortRatio for leg #8. Must be greater than zero.
244side8enum : BuySellOrder side for leg #8.
247refPrc8doubleReference price for leg #8.
250refDelta8floatReference delta for leg #8.
253secKey9OptionKeySymbol for leg #9. Must be a valid symbol.
256secType9enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
259ratio9ushortRatio for leg #9. Must be greater than zero.
262side9enum : BuySellOrder side for leg #9.
265refPrc9doubleReference price for leg #9.
268refDelta9floatReference delta for leg #9.
271secKey10OptionKeySymbol for leg #10. Must be a valid symbol.
274secType10enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
277ratio10ushortRatio for leg #10. Must be greater than zero.
280side10enum : BuySellOrder side for leg #10.
283refPrc10doubleReference price for leg #10.
286refDelta10floatReference delta for leg #10.
289secKey11OptionKeySymbol for leg #11. Must be a valid symbol.
292secType11enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
295ratio11ushortRatio for leg #11. Must be greater than zero.
298side11enum : BuySellOrder side for leg 1#1.
301refPrc11doubleReference price for leg #11.
304refDelta11floatReference delta for leg #11.
307secKey12OptionKeySymbol for leg #12. Must be a valid symbol.
310secType12enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
313ratio12ushortRatio for leg #12. Must be greater than zero.
316side12enum : BuySellOrder side for leg #12.
319refPrc12doubleReference price for leg #12.
322refDelta12floatReference delta for leg #12.
325secKey13OptionKeySymbol for leg #13. Must be a valid symbol.
328secType13enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
331ratio13ushortRatio for leg #13. Must be greater than zero.
334side13enum : BuySellOrder side for leg #13.
337refPrc13doubleReference price for leg #13.
340refDelta13floatReference delta for leg #13.
343secKey14OptionKeySymbol for leg #14. Must be a valid symbol.
346secType14enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
349ratio14ushortRatio for leg 1#4. Must be greater than zero.
352side14enum : BuySellOrder side for leg #14.
355refPrc14doubleReference price for leg #14.
358refDelta14floatReference delta for leg #14.
361secKey15OptionKeySymbol for leg #15. Must be a valid symbol.
364secType15enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
367ratio15ushortRatio for leg #15. Must be greater than zero.
370side15enum : BuySellOrder side for leg #15.
373refPrc15doubleReference price for leg #15.
376refDelta15floatReference delta for leg #15.
379secKey16OptionKeySymbol for leg #16. Must be a valid symbol.
382secType16enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
385ratio16ushortRatio for leg #16. Must be greater than zero.
388side16enum : BuySellOrder side for leg #16.
391refPrc16doubleReference price for leg #16.
394refDelta16floatReference delta for leg #16.
397secKey17OptionKeySymbol for leg #17. Must be a valid symbol.
400secType17enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
403ratio17ushortRatio for leg #17. Must be greater than zero.
406side17enum : BuySellOrder side for leg #17.
409refPrc17doubleReference price for leg #17.
412refDelta17floatReference delta for leg #17.
415secKey18OptionKeySymbol for leg #18. Must be a valid symbol.
418secType18enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
421ratio18ushortRatio for leg #18. Must be greater than zero.
424side18enum : BuySellOrder side for leg #18.
427refPrc18doubleReference price for leg #18.
430refDelta18floatReference delta for leg #18.
433secKey19OptionKeySymbol for leg #19. Must be a valid symbol.
436secType19enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
439ratio19ushortRatio for leg #19. Must be greater than zero.
442side19enum : BuySellOrder side for leg #19.
445refPrc19doubleReference price for leg #19.
448refDelta19floatReference delta for leg #19.
451secKey20OptionKeySymbol for leg #20. Must be a valid symbol.
454secType20enum : SpdrKeyTypeSecurity Type [Stock, Future, Option]
457ratio20ushortRatio for leg #20. Must be greater than zero.
460side20enum : BuySellOrder side for leg #20.
463refPrc20doubleReference price for leg #20.
466refDelta20floatReference delta for leg #20.
469modifiedBystring(24)user who last modified this record
472modifiedInenum : SysEnvironment
475timestampDateTimetimestamp of last modification

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 = 'SecDefRequestGateway'

# 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 = 'SecDefRequestGateway'

# 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 = 'secDefType|accnt|clientFirm|altRequestId|secKey1|secType1|ratio1|side1|refPrc1|refDelta1|secKey2|secType2|ratio2|side2|refPrc2|refDelta2|secKey3|secType3|ratio3|side3|refPrc3|refDelta3|secKey4|secType4|ratio4|side4|refPrc4|refDelta4|secKey5|secType5|ratio5|side5|refPrc5|refDelta5|secKey6|secType6|ratio6|side6|refPrc6|refDelta6|secKey7|secType7|ratio7|side7|refPrc7|refDelta7|secKey8|secType8|ratio8|side8|refPrc8|refDelta8|secKey9|secType9|ratio9|side9|refPrc9|refDelta9|secKey10|secType10|ratio10|side10|refPrc10|refDelta10|secKey11|secType11|ratio11|side11|refPrc11|refDelta11|secKey12|secType12|ratio12|side12|refPrc12|refDelta12|secKey13|secType13|ratio13|side13|refPrc13|refDelta13|secKey14|secType14|ratio14|side14|refPrc14|refDelta14|secKey15|secType15|ratio15|side15|refPrc15|refDelta15|secKey16|secType16|ratio16|side16|refPrc16|refDelta16|secKey17|secType17|ratio17|side17|refPrc17|refDelta17|secKey18|secType18|ratio18|side18|refPrc18|refDelta18|secKey19|secType19|ratio19|side19|refPrc19|refDelta19|secKey20|secType20|ratio20|side20|refPrc20|refDelta20|modifiedBy|modifiedIn|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 = '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 = 'SecDefRequestGateway'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'secDefType|accnt|clientFirm|altRequestId|secKey1|secType1|ratio1|side1|refPrc1|refDelta1|secKey2|secType2|ratio2|side2|refPrc2|refDelta2|secKey3|secType3|ratio3|side3|refPrc3|refDelta3|secKey4|secType4|ratio4|side4|refPrc4|refDelta4|secKey5|secType5|ratio5|side5|refPrc5|refDelta5|secKey6|secType6|ratio6|side6|refPrc6|refDelta6|secKey7|secType7|ratio7|side7|refPrc7|refDelta7|secKey8|secType8|ratio8|side8|refPrc8|refDelta8|secKey9|secType9|ratio9|side9|refPrc9|refDelta9|secKey10|secType10|ratio10|side10|refPrc10|refDelta10|secKey11|secType11|ratio11|side11|refPrc11|refDelta11|secKey12|secType12|ratio12|side12|refPrc12|refDelta12|secKey13|secType13|ratio13|side13|refPrc13|refDelta13|secKey14|secType14|ratio14|side14|refPrc14|refDelta14|secKey15|secType15|ratio15|side15|refPrc15|refDelta15|secKey16|secType16|ratio16|side16|refPrc16|refDelta16|secKey17|secType17|ratio17|side17|refPrc17|refDelta17|secKey18|secType18|ratio18|side18|refPrc18|refDelta18|secKey19|secType19|ratio19|side19|refPrc19|refDelta19|secKey20|secType20|ratio20|side20|refPrc20|refDelta20|modifiedBy|modifiedIn|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 = '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 = 'secDefType: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 = 'SecDefRequestGateway'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'secDefType|accnt|clientFirm|altRequestId|secKey1|secType1|ratio1|side1|refPrc1|refDelta1|secKey2|secType2|ratio2|side2|refPrc2|refDelta2|secKey3|secType3|ratio3|side3|refPrc3|refDelta3|secKey4|secType4|ratio4|side4|refPrc4|refDelta4|secKey5|secType5|ratio5|side5|refPrc5|refDelta5|secKey6|secType6|ratio6|side6|refPrc6|refDelta6|secKey7|secType7|ratio7|side7|refPrc7|refDelta7|secKey8|secType8|ratio8|side8|refPrc8|refDelta8|secKey9|secType9|ratio9|side9|refPrc9|refDelta9|secKey10|secType10|ratio10|side10|refPrc10|refDelta10|secKey11|secType11|ratio11|side11|refPrc11|refDelta11|secKey12|secType12|ratio12|side12|refPrc12|refDelta12|secKey13|secType13|ratio13|side13|refPrc13|refDelta13|secKey14|secType14|ratio14|side14|refPrc14|refDelta14|secKey15|secType15|ratio15|side15|refPrc15|refDelta15|secKey16|secType16|ratio16|side16|refPrc16|refDelta16|secKey17|secType17|ratio17|side17|refPrc17|refDelta17|secKey18|secType18|ratio18|side18|refPrc18|refDelta18|secKey19|secType19|ratio19|side19|refPrc19|refDelta19|secKey20|secType20|ratio20|side20|refPrc20|refDelta20|modifiedBy|modifiedIn|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'secDefType|secType1|side1|secType2|side2|secType3|side3|secType4|side4|secType5|side5|secType6|side6|secType7|side7|secType8|side8|secType9|side9|secType10|side10|secType11|side11|secType12|side12|secType13|side13|secType14|side14|secType15|side15|secType16|side16|secType17|side17|secType18|side18|secType19|side19|secType20|side20|modifiedIn'

# 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 = 'SecDefRequestGateway'

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