Skip to main content
Version: 8.6.9.2

Schema: SpdrAllocationNotice (ID: 3695)

METADATA​

AttributeValue
Topic3695-order-allocation
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=allocNumberlongunique number assigned to this allocation notice
100tradeDateDateKey
106omniAccntstring(16)omnibus accnt (SR accnt)
103omniCFirmstring(16)omni SR client firm
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 : NoticeStatePendNew = first allocation (In/Out pair) arrived, child order not yet fully allocated; republished New when fully allocated (triggers delivery); Bust/Amend = corrections
130noticeTexttext1
133allocMethodenum : AllocMethodmethod for delivery of the allocation instruction to the broker
402execBrkrCodestring(16)used for FIX routing (can be null)
403allocExDeststring(16)used for FIX routing
136orderShapeenum : SpdrOrderShapeSingle or MLeg
139cumFillQuantityintchild order fill size
142avgFillPricedoubleparent order average fill price
145netMoneydoublenet allocation money
151clOrdIdlong
154orderSizeint
409baseParentNumberlongomnibus parent order behind this child
163streetClOrdIdstring(24)usually clOrdID.X16 but can be different if street gateway was translating clOrdId
166streetOrderIdstring(24)street side order ID (for canceling order)
376modifiedBystring(24)user who last modified this record
379modifiedInenum : SysEnvironment
382timestampDateTimetimestamp of last modification

REPEATING FIELDS​

Fragments

#FieldTypeDefault ValueComment
172fragAccntstring(16)SR alloc accnt
385fragCFirmstring(16)SR client firm
175allocAccntstring(16)clearing firm alloc accnt (maps to Fix.AllocAccount)
178allocFragIdlongunique ID of this alloc/fragment (maps to Fix.IndividualAllocID)
181allocSizeintaccnt alloc size

Execs

#FieldTypeDefault ValueComment
405fillNumberlongSpdrParentExecution backing this notice
406allocFragIdlongthe Fragments row it fed
407execQtyintquantity from this fill to that fragment (fill scale)
408execPrcdoublethe fill's own price (the notice itself reports avgFillPrice)

OrderLegs

#FieldTypeDefault ValueComment
386secKeyOptionKey
387secTypeenum : SpdrKeyType
388multushort
389sideenum : BuySell
390legIdlongSR leg Id
391altLegIdstring(24)client leg Id (usually from a FIX order)
392sumLegQtyint
393sumLegMnydouble

LegPosType

#FieldTypeDefault ValueComment
395secKeyOptionKey
396secTypeenum : SpdrKeyType
397accntstring(16)SR alloc accnt (matches fragment)
398clientFirmstring(16)SR client firm
399ssaleFlagenum : ShortSaleFlagssale flag (if secType = Stock)
400positionTypeenum : PositionTypepositionType (if secType != Stock)
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|omniAccnt|omniCFirm|secKey|secType|mlegLegKey|orderSide|ssaleFlag|positionType|noticeState|noticeText|allocMethod|execBrkrCode|allocExDest|orderShape|cumFillQuantity|avgFillPrice|netMoney|clOrdId|orderSize|baseParentNumber|streetClOrdId|streetOrderId|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 = 'omniAccnt: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|omniAccnt|omniCFirm|secKey|secType|mlegLegKey|orderSide|ssaleFlag|positionType|noticeState|noticeText|allocMethod|execBrkrCode|allocExDest|orderShape|cumFillQuantity|avgFillPrice|netMoney|clOrdId|orderSize|baseParentNumber|streetClOrdId|streetOrderId|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 = 'omniAccnt: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|omniAccnt|omniCFirm|secKey|secType|mlegLegKey|orderSide|ssaleFlag|positionType|noticeState|noticeText|allocMethod|execBrkrCode|allocExDest|orderShape|cumFillQuantity|avgFillPrice|netMoney|clOrdId|orderSize|baseParentNumber|streetClOrdId|streetOrderId|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 = 'omniAccnt: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 = 'omniAccnt: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)