Skip to main content
Version: 8.5.11.3

Schema: HedgePolicyConfig (ID: 1813)

METADATA

AttributeValue
Topic1800-client-config
MLink TokenClientControl
SRSE ProductSRControl

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

BODY

#FieldTypeDefault ValueComment
10=accntstring(16)
11=clientFirmstring(16)
12=policyenum : HedgePolicy
100autoHedgeEnabledenum : YesNo
101hedgeWavesEnabledenum : YesNo
102autoHedgeWindowenum : AutoHedgeWindow
103autoHedgeNettingenum : AutoHedgeNetting
104autoHedgeSymBandDDfloatindividual hedge target hedge band ($delta) (hedge to zero when outside band)
112modifiedBystring(24)user who last modified this record
113modifiedInenum : SysEnvironment
114timestampDateTimetimestamp of last modification

REPEATING FIELDS

HedgeWaves

#FieldTypeDefault ValueComment
106hedgePeriodenum : HedgePeriod
107symHedgeBandDDfloatindividual hedge target hedge band ($delta)
108symHedgeBandGRfloatindividual hedge target hedge band (gamma ratio)
109balanceSymbolsenum : YesNobalance accnt level deltas from all symbols using this policy
110hedgeSliceenum : HedgeSlice
111hedgeObjectiveenum : HedgeObjective

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

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

# 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 = 'autoHedgeEnabled|hedgeWavesEnabled|autoHedgeWindow|autoHedgeNetting|autoHedgeSymBandDD|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 = 'HedgePolicyConfig'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'autoHedgeEnabled|hedgeWavesEnabled|autoHedgeWindow|autoHedgeNetting|autoHedgeSymBandDD|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 = 'autoHedgeEnabled: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 = 'HedgePolicyConfig'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'autoHedgeEnabled|hedgeWavesEnabled|autoHedgeWindow|autoHedgeNetting|autoHedgeSymBandDD|modifiedBy|modifiedIn|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'autoHedgeEnabled|hedgeWavesEnabled|autoHedgeWindow|autoHedgeNetting|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 = 'HedgePolicyConfig'

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

Post 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'

# Request Parameters
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'postmsgs',
"postaction": "I", # (I)nsert, (U)pdate, (R)eplace, or (D)elete
"postmerge": "Y", # (Y)es or (N)o
}

payload = {
"header": {
"mTyp": "HedgePolicyConfig"
},
"message": {
"pkey": {
"accnt": "exampleString", // string
"clientFirm": "exampleString", // string
"policy": "enumValue" // enum(HedgePolicy) - None A B C D E
},
"autoHedgeEnabled": "enumValue", // enum(YesNo) - None, Yes, No
"hedgeWavesEnabled": "enumValue", // enum(YesNo) - None, Yes, No
"autoHedgeWindow": "enumValue", // enum(AutoHedgeWindow) - None, Immediate, Sec_5, Sec_15, Sec_30, Sec_60
"autoHedgeNetting": "enumValue", // enum(AutoHedgeNetting) - None, Pct_25, Pct_50, Pct_100
"autoHedgeSymBandDD": 1.0, // float
"modifiedBy": "exampleString", // string
"modifiedIn": "enumValue", // enum(SysEnvironment) - None, Neptune, Pluto, V7_Stable, V7_Latest, Saturn, Venus, Mars, SysTest, V7_Current
"timestamp": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"HedgeWaves": [ // Repeating Field
{
"hedgePeriod": "enumValue", // enum(HedgePeriod) - None, Opn05_Opn30, Opn30_Opn60, Opn60_Cls60, Cls60_Cls30, Cls30_Cls05, Cls05_Cls
"symHedgeBandDD": 1.0, // float
"symHedgeBandGR": 1.0, // float
"balanceSymbols": "enumValue", // enum(YesNo) - None, Yes, No
"hedgeSlice": "enumValue", // enum(HedgeSlice) - None, Min_2, Min_5, Min_10, Min_15
"hedgeObjective": "enumValue" // enum(HedgeObjective) - None, Opn_Zero, Opn_Edge, NetOpn_Zero, NetOpn_Edge, Trd_Zero, Trd_Edge, NetTrd_Zero, NetTrd_Edge, Pos_Zero, Pos_Edge
}
]
}
}

response = requests.post(MLINK_PROD_URL, params=params, json=payload)