Schema: SpdrAutoHedgeControl (ID: 5295)
SpdrAutoHedgeControl contains autohedge / risk group control details. Can be uploaded from SRSE, created from ExecutionEngines, or created by SR tools.
BridgeFromV7:SpdrRiskGroupControl
METADATA
Attribute | Value |
---|---|
Topic | 5290-strategy-autohedge |
MLink Token | ClientTrading |
SRSE Product | SRTrade |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | accnt | string(16) | |
11= | riskGroupId | long | riskGroupId = 0 means hedgeScope = Accnt |
12= | hedgeSecKey | ExpiryKey | Execution Hedge SecKey (from SpdrParentExecution.hedgeSecKey) |
13= | hedgeSecType | enum : SpdrKeyType | Execution Hedge SecType (Stock or Future) |
14= | clientFirm | string(16) | |
103 | altOrderId | string(24) | alternate order ID (usually clOrdId from client) |
106 | altAccnt | string(32) | alternate (client assigned) "long" account string (optional) [used to map between client and SR account strings] |
109 | altUserName | string(24) | alternate (client assigned) user name (optional) [used to map between client and SR account strings] |
112 | srcRoutingCode | string(65) | inbound FIX routing code or SRSE/tool server appID (if any) |
254 | execBrkrCode | string(16) | (optional) override the default execBrkrCode for this order |
255 | externExDest | string(16) | routing code for orders directed to an external order router (default = null); should match FixRoutingTable.destination (in SR accnt config) |
121 | externParams | text1 | external algo names/parameters (usually just an algo name) |
124 | strategy | string(36) | client-supplied strategy string;visible on SpiderRock GUI tools and other order reports. |
127 | userName | string(24) | name of the user entering the order |
130 | autoHedge | enum : AutoHedge | auto-hedge algorithm (used for restoring tickets) |
133 | hedgeTarget | enum : HedgeTarget | |
136 | minHedgeDDelta | float | do not generate autohedge orders if total group 100,000, +$100,000]) |
139 | maxHedgeDDelta | float | |
142 | orderSize | int | initial (and maximum) size of a hedge parent buy or sell order. note: actual working size will be controlled by the autohedge server based on filled deltas but working size cannot exceed orderSize |
145 | ssaleFlag | enum : ShortSaleFlag | |
251 | positionType | enum : PositionType | |
148 | maxExposureSize | int | maximum simultaneous cumulative child order public size exposure (-1 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 1] |
151 | numMakeExchanges | byte | number of exchanges (1 - 4) on which to publish public making orders. Effective number might be less than requested number if sufficient exchanges are not available. |
154 | publicSize | enum : PublicSizeHandling | public order size handling: None=use default size handling (usually limits public size to 'typical' market size); Randomize=randomize public size; FullSize=expose entire order size where possible |
157 | canOverlapCxlRepl | enum : YesNo | can execution engines overlap cancel/replace operations [order can overfill if YES] (at most one active overlapping cxl/replace operation for each parent order) |
160 | progressRule | enum : ProgressRule | Immediate = all size immediately available; TWAP = size released in time intervals;VWAP = size released in volume intervals;TwapForce = size released in intervals/execution forced at the end of interval |
163 | progressSliceCnt | byte | number of twap slices to use (default = 4 or 8) [max 20] |
166 | progressExposeTime | int | minimum time (secs) to expose order (0 = no minimum; used to guarantee that the order is exposed at mid-market for some time before actively taking) |
169 | vwapParticipation | float | target vwap participation rate (target % of trade activity) |
172 | minMktOnClosePct | byte | Minimum pct [0 - 100] of order reserved for the on-close auction |
175 | maxMakeExchFee | float | maximum making exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply] |
178 | maxTakeExchFee | float | maximum taking exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply] |
181 | incTakeExchFee | enum : IncExchFee | include exchange fee in probability |
184 | incMakeExchFee | enum : IncExchFee | include exchange fee in probability |
187 | makeExchRule | enum : MakeExchRule | ActiveMaker exchange preference rule: 'MaxPart' will pick exchanges to maximize participation; 'FeeOrder' will pick exchanges to minimize fees [maximize rebates]; 'ImprvOnly' will only make when improving NBBO. |
190 | maxChildOrders | int | maximum number of child orders that can be generated by this parent order [order will terminate if/when this cap is reached;zero or neg = unlimited] |
193 | exchMask | uint | eligible exchanges (0 = all) |
252 | marketSession | enum : MarketSession | |
199 | startDttm | DateTime | [optional] (parent order start time) |
202 | orderDuration | int | [optional] (number of seconds) |
253 | activeDuration | int | [optional] (number of seconds) |
205 | goodTillDttm | DateTime | [optional] (default: 2099-01-01) |
208 | parentOrderHandling | enum : ParentOrderHandling | |
211 | parentBalanceHandling | enum : ParentBalanceHandling | |
214 | orderLimitType | enum : SpdrLimitType | |
217 | takeLimitClass | enum : SpdrLimitClass | Simple = LimitPrice, Probability = BEST(LimitPrice, ProbLimit) |
220 | makeLimitClass | enum : SpdrLimitClass | Simple = LimitPrice, Probability = BEST(LimitPrice, ProbLimit) |
223 | orderPrcLimit | double | Applies if LimitType = Prc[] |
226 | orderPrcOffset | double | default=0 |
229 | stateModel | enum : StateModel | |
232 | takeAlphaType | enum : AlphaType | Applies if takeLimitClass = Probability |
235 | makeAlphaType | enum : AlphaType | Applies if makeLimitClass = Probability |
238 | takeAlphaFactor | float | [-2,+2] takeProbLimit = MAX(takeProbability, takeProbAvg + takeAlphaFactor * takeProbStd) [if AlphaType = Relative] |
241 | makeAlphaFactor | float | [-2,+2] makeProbLimit = MAX(makeProbability, makeProbAvg + makeAlphaFactor * makeProbStd) [if AlphaType = Relative] |
244 | takeProbability | float | takeProbLimit = takeProbability [if AlphaType = Static] |
247 | makeProbability | float | makeProbLimit = makeProbability [if AlphaType = Static] |
250 | timestamp | DateTime | record timestamp |
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 = 'SpdrAutoHedgeControl'
# 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=SpdrAutoHedgeControl'
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 = 'SpdrAutoHedgeControl'
# 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 = 'altOrderId|altAccnt|altUserName|srcRoutingCode|execBrkrCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|positionType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|maxChildOrders|exchMask|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|orderPrcLimit|orderPrcOffset|stateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|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)
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=SpdrAutoHedgeControl' \
--data-urlencode 'view=altOrderId|altAccnt|altUserName|srcRoutingCode|execBrkrCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|positionType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|maxChildOrders|exchMask|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|orderPrcLimit|orderPrcOffset|stateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString'
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 = 'SpdrAutoHedgeControl'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'altOrderId|altAccnt|altUserName|srcRoutingCode|execBrkrCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|positionType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|maxChildOrders|exchMask|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|orderPrcLimit|orderPrcOffset|stateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|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 = 'altOrderId: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=SpdrAutoHedgeControl' \
--data-urlencode 'view=altOrderId|altAccnt|altUserName|srcRoutingCode|execBrkrCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|positionType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|maxChildOrders|exchMask|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|orderPrcLimit|orderPrcOffset|stateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=altOrderId: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 = 'SpdrAutoHedgeControl'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'altOrderId|altAccnt|altUserName|srcRoutingCode|execBrkrCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|positionType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|maxChildOrders|exchMask|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|orderPrcLimit|orderPrcOffset|stateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'autoHedge|hedgeTarget|ssaleFlag|positionType|publicSize|canOverlapCxlRepl|progressRule|incTakeExchFee|incMakeExchFee|makeExchRule|marketSession|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|stateModel|takeAlphaType|makeAlphaType'
# 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)
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=SpdrAutoHedgeControl' \
--data-urlencode 'measure=altOrderId|altAccnt|altUserName|srcRoutingCode|execBrkrCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|positionType|maxExposureSize|numMakeExchanges|publicSize|canOverlapCxlRepl|progressRule|progressSliceCnt|progressExposeTime|vwapParticipation|minMktOnClosePct|maxMakeExchFee|maxTakeExchFee|incTakeExchFee|incMakeExchFee|makeExchRule|maxChildOrders|exchMask|marketSession|startDttm|orderDuration|activeDuration|goodTillDttm|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|orderPrcLimit|orderPrcOffset|stateModel|takeAlphaType|makeAlphaType|takeAlphaFactor|makeAlphaFactor|takeProbability|makeProbability|timestamp' \
--data-urlencode 'group=autoHedge|hedgeTarget|ssaleFlag|positionType|publicSize|canOverlapCxlRepl|progressRule|incTakeExchFee|incMakeExchFee|makeExchRule|marketSession|parentOrderHandling|parentBalanceHandling|orderLimitType|takeLimitClass|makeLimitClass|stateModel|takeAlphaType|makeAlphaType' \
--data-urlencode 'where=accnt:eq:ExampleString'
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 = 'SpdrAutoHedgeControl'
# 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)
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=SpdrAutoHedgeControl' \
--data-urlencode 'where=accnt:eq:ExampleString'