Skip to main content
Version: Staging

Schema: SpdrAllocationNotice (ID: 3695)

METADATA

AttributeValue
Topic3695-order-allocation
MLink TokenSystemData
SRSE ProductSRTrade

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

BODY

#FieldTypeComment
10=allocNumberlongunique number assigned to this allocation notice
100tradeDateDateKey
103clientFirmstring(16)
106omniAccntstring(16)omnibus accnt (SR accnt)
109secKeyOptionKeysecurity key (stock, future, or option)
112secTypeenum : SpdrKeyTypesecurity type
115mlegLegKeytext1[secKey.StringKey;legRatio;side;positionEffect, secKey.StringKey;legRatio;side;positionEffect, ...]
118orderSideenum : BuySellorder side (always buy for MLEG orders)
121ssaleFlagenum : ShortSaleFlagssale flag (None if not stock)
124positionTypeenum : PositionTypepositionType (None if not equity option)
127noticeStateenum : NoticeStateindicates that this noticed is ready to forward to a custodian
130noticeTexttext1
133allocMethodenum : AllocMethodmethod for delivery of the allocation instruction to the broker
402execBrkrCodestring(16)used for FIX routing (can be null)
384allocExDeststring(16)used for FIX routing
136orderShapeenum : SpdrOrderShapeSingle or MLeg
139cumFillQuantityinttotal fill size of all ChildOrders
142avgFillPricedoubleparent order average fill price
145netMoneydoublenet allocation money
376modifiedBystring(24)user who last modified this record
379modifiedInenum : SysEnvironment
382timestampDateTimetimestamp of last modification

REPEATING FIELDS

ChildOrders

FieldTypeComment
151clOrdIdlong
154orderSizeint
157cumFillQuantityint
160avgFillPricedouble
163streetClOrdIdstring(24)
166streetOrderIdstring(24)

Fragments

FieldTypeComment
172accntstring(16)
385clientFirmstring(16)
175allocAccntstring(16)
178allocFragIdlong
181allocSizeint

OrderLegs

FieldTypeComment
386secKeyOptionKey
387secTypeenum : SpdrKeyType
388multushort
389sideenum : BuySell
390legIdlong
391altLegIdstring(24)
392sumLegQtyint
393sumLegMnydouble

LegPosType

FieldTypeComment
395secKeyOptionKey
396secTypeenum : SpdrKeyType
397accntstring(16)
398clientFirmstring(16)
399ssaleFlagenum : ShortSaleFlag
400positionTypeenum : PositionType
401firmPositionint

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

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

# 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 = 'tradeDate|clientFirm|omniAccnt|secKey|secType|mlegLegKey|orderSide|ssaleFlag|positionType|noticeState|noticeText|allocMethod|execBrkrCode|allocExDest|orderShape|cumFillQuantity|avgFillPrice|netMoney|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 = 'clientFirm: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 = 'SpdrAllocationNotice'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'tradeDate|clientFirm|omniAccnt|secKey|secType|mlegLegKey|orderSide|ssaleFlag|positionType|noticeState|noticeText|allocMethod|execBrkrCode|allocExDest|orderShape|cumFillQuantity|avgFillPrice|netMoney|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 = 'clientFirm: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 = 'tradeDate: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 = 'SpdrAllocationNotice'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'tradeDate|clientFirm|omniAccnt|secKey|secType|mlegLegKey|orderSide|ssaleFlag|positionType|noticeState|noticeText|allocMethod|execBrkrCode|allocExDest|orderShape|cumFillQuantity|avgFillPrice|netMoney|modifiedBy|modifiedIn|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'secType|orderSide|ssaleFlag|positionType|noticeState|allocMethod|orderShape|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 = 'clientFirm: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 = 'SpdrAllocationNotice'

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