Schema: AutoHedgeControlGateway (ID: 5130)
SpdrAutoHedgeControl contains autohedge / risk group control details. Can be uploaded from SRSE, created from ExecutionEngines, or created by SR tools.
METADATA
Attribute | Value |
---|---|
Topic | 5120-srse-gateway |
MLink Token | Internal |
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) | |
100 | altOrderId | string(24) | alternate order ID (usually clOrdId from client) |
103 | altAccnt | string(32) | alternate (client assigned) "long" account string (optional) [used to map between client and SR account strings] |
106 | altUserName | string(24) | alternate (client assigned) user name (optional) [used to map between client and SR account strings] |
109 | srcRoutingCode | string(65) | inbound FIX routing code or SRSE/tool server appID (if any) |
112 | accntRouteCode | text1 | accntRoute acronym |
250 | externExDest | string(16) | routing code for orders directed to an external order router (default = null); should match FixRoutingTable.destination (in SR accnt config) |
118 | externParams | text1 | external algo names/parameters (usually just an algo name) |
121 | strategy | string(36) | client-supplied strategy string;visible on SpiderRock GUI tools and other order reports. |
124 | userName | string(24) | name of the user entering the order |
127 | autoHedge | enum : AutoHedge | auto-hedge algorithm (used for restoring tickets) |
130 | hedgeTarget | enum : HedgeTarget | |
133 | minHedgeDDelta | float | do not generate autohedge orders if total group 100,000, +$100,000]) |
136 | maxHedgeDDelta | float | |
139 | 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 |
142 | ssaleFlag | enum : ShortSaleFlag | |
145 | maxExposureSize | int | maximum simultaneous cumulative child order public size exposure (-1 = orderActiveSize) [order can overfill if > orderActiveSize and numMakeExchanges > 1] |
148 | 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. |
151 | 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 |
154 | 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) |
157 | 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 |
160 | progressSliceCnt | byte | number of twap slices to use (default = 4 or 8) [max 20] |
163 | 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) |
166 | vwapParticipation | float | target vwap participation rate (target % of trade activity) |
169 | minMktOnClosePct | byte | Minimum pct [0 - 100] of order reserved for the on-close auction |
172 | maxMakeExchFee | float | maximum making exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply] |
175 | maxTakeExchFee | float | maximum taking exchange fee (in point value) [zero = no limit; use non-zero number for limit to apply] |
178 | incTakeExchFee | enum : IncExchFee | include exchange fee in probability |
181 | incMakeExchFee | enum : IncExchFee | include exchange fee in probability |
184 | 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. |
187 | 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] |
190 | exchMask | uint | eligible exchanges (0 = all) |
248 | marketSession | enum : MarketSession | |
196 | startDttm | DateTime | [optional] (parent order start time) |
199 | orderDuration | int | [optional] (number of seconds) |
249 | activeDuration | int | |
202 | goodTillDttm | DateTime | [optional] (default: 2099-01-01) |
205 | parentOrderHandling | enum : ParentOrderHandling | |
208 | parentBalanceHandling | enum : ParentBalanceHandling | |
211 | orderLimitType | enum : SpdrLimitType | |
214 | takeLimitClass | enum : SpdrLimitClass | Simple = LimitPrice, Probability = BEST(LimitPrice, ProbLimit) |
217 | makeLimitClass | enum : SpdrLimitClass | Simple = LimitPrice, Probability = BEST(LimitPrice, ProbLimit) |
220 | orderPrcLimit | double | Applies if LimitType = Prc[] |
223 | orderPrcOffset | double | default=0 |
226 | stateModel | enum : StateModel | |
229 | takeAlphaType | enum : AlphaType | Applies if takeLimitClass = Probability |
232 | makeAlphaType | enum : AlphaType | Applies if makeLimitClass = Probability |
235 | takeAlphaFactor | float | [-2,+2] takeProbLimit = MAX(takeProbability, takeProbAvg + takeAlphaFactor * takeProbStd) [if AlphaType = Relative] |
238 | makeAlphaFactor | float | [-2,+2] makeProbLimit = MAX(makeProbability, makeProbAvg + makeAlphaFactor * makeProbStd) [if AlphaType = Relative] |
241 | takeProbability | float | takeProbLimit = takeProbability [if AlphaType = Static] |
244 | makeProbability | float | makeProbLimit = makeProbability [if AlphaType = Static] |
247 | 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 = 'AutoHedgeControlGateway'
# 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=AutoHedgeControlGateway'
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 = 'AutoHedgeControlGateway'
# 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|accntRouteCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|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=AutoHedgeControlGateway' \
--data-urlencode 'view=altOrderId|altAccnt|altUserName|srcRoutingCode|accntRouteCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|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 = 'AutoHedgeControlGateway'
# 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|accntRouteCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|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=AutoHedgeControlGateway' \
--data-urlencode 'view=altOrderId|altAccnt|altUserName|srcRoutingCode|accntRouteCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|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 = 'AutoHedgeControlGateway'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'altOrderId|altAccnt|altUserName|srcRoutingCode|accntRouteCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|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|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=AutoHedgeControlGateway' \
--data-urlencode 'measure=altOrderId|altAccnt|altUserName|srcRoutingCode|accntRouteCode|externExDest|externParams|strategy|userName|autoHedge|hedgeTarget|minHedgeDDelta|maxHedgeDDelta|orderSize|ssaleFlag|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|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 = 'AutoHedgeControlGateway'
# 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=AutoHedgeControlGateway' \
--data-urlencode 'where=accnt:eq:ExampleString'