Schema: PositionHedgePolicyConfig (ID: 1813)
METADATA
Attribute | Value |
---|---|
Topic | 1800-client-config |
MLink Token | ClientControl |
SRSE Product | SRControl |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | accnt | string(16) | |
11= | clientFirm | string(16) | |
12= | policy | enum : PositionHedgePolicy | |
100 | enabled | enum : YesNo | |
101 | hedgeDeltaRule | enum : HedgeDeltaRule | HedgeDelta Source (IVol = use SR implied surface (sticky strike), IvS = use SR surface (dynamic), TVol = use user supplied theo surface (sticky strike), TvS = use user supplied theo surface (dynamic)) [AccountConfig.hedgeDelta] |
102 | binaryDays | float | used to force delta calcs binary prior to expiration (1.0 = force to binary at the start of the final regular market; 0.5 = force to binary half way through final regular market) |
107 | balanceSymbols | enum : YesNo | balance accnt level deltas from all symbols using this policy |
108 | hedgeAlgo | enum : HedgeAlgo | |
109 | execBrkrAlgo | string(32) | display name of exec broker algo (should not have spaces) |
110 | execBrkrCode | string(16) | required if BROKER_ALGO |
111 | execBkkrTags | text1 | key/value set of algo tags |
112 | eodHedgeWindow | enum : HedgeWindow | |
113 | eodSymHedgeBandDD | float | individual symbol hedge band ($delta) |
114 | eodSymHedgeBandGR | float | individual symbol hedge band (gamma ratio) |
115 | eodBalanceSymbols | enum : YesNo | balance accnt level deltas from all symbols using this policy |
116 | eodHedgeAlgo | enum : HedgeAlgo | |
117 | eodExecBrkrAlgo | string(32) | display name of exec broker algo (should not have spaces) |
118 | eodExecBrkrCode | string(16) | required if BROKER_ALGO |
119 | eodExecBkkrTags | text1 | key/value set of algo tags that get forwarded to exec broker on order |
120 | clsHedgeWindow | enum : ClsHedgeWindow | |
121 | clsAuctionSymHedgeBandDD | float | individual symbol hedge band ($delta) (if participating in closing auction) |
122 | clsAuctionSymHedgeBandGR | float | individual symbol hedge band (gamma ratio) (if participating in closing auction) |
123 | clsSymHedgeBandDD | float | individual symbol hedge band ($delta) (if using an EOD algo) |
124 | clsSymHedgeBandGR | float | individual symbol hedge band (gamma ratio) (if using an EOD algo) |
125 | clsBalanceSymbols | enum : YesNo | balance accnt level deltas from all symbols using this policy |
126 | clsHedgeAlgo | enum : ClsHedgeAlgo | |
127 | clsExecBrkrAlgo | string(32) | display name of exec broker algo (should not have spaces) |
128 | clsExecBrkrCode | string(16) | required if BROKER_ALGO |
129 | clsExecBkkrTags | text1 | key/value set of algo tags that get forwarded to exec broker on order |
130 | modifiedBy | string(24) | user who last modified this record |
131 | modifiedIn | enum : SysEnvironment | |
132 | timestamp | DateTime | timestamp of last modification |
REPEATING FIELDS
HedgeWaves
Field | Type | Comment |
---|---|---|
104 | hedgeTime | TimeSpan |
105 | symHedgeBandDD | float |
106 | symHedgeBandGR | float |
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 = 'PositionHedgePolicyConfig'
# 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=PositionHedgePolicyConfig'
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 = 'PositionHedgePolicyConfig'
# 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 = 'enabled|hedgeDeltaRule|binaryDays|balanceSymbols|hedgeAlgo|execBrkrAlgo|execBrkrCode|execBkkrTags|eodHedgeWindow|eodSymHedgeBandDD|eodSymHedgeBandGR|eodBalanceSymbols|eodHedgeAlgo|eodExecBrkrAlgo|eodExecBrkrCode|eodExecBkkrTags|clsHedgeWindow|clsAuctionSymHedgeBandDD|clsAuctionSymHedgeBandGR|clsSymHedgeBandDD|clsSymHedgeBandGR|clsBalanceSymbols|clsHedgeAlgo|clsExecBrkrAlgo|clsExecBrkrCode|clsExecBkkrTags|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)
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=PositionHedgePolicyConfig' \
--data-urlencode 'view=enabled|hedgeDeltaRule|binaryDays|balanceSymbols|hedgeAlgo|execBrkrAlgo|execBrkrCode|execBkkrTags|eodHedgeWindow|eodSymHedgeBandDD|eodSymHedgeBandGR|eodBalanceSymbols|eodHedgeAlgo|eodExecBrkrAlgo|eodExecBrkrCode|eodExecBkkrTags|clsHedgeWindow|clsAuctionSymHedgeBandDD|clsAuctionSymHedgeBandGR|clsSymHedgeBandDD|clsSymHedgeBandGR|clsBalanceSymbols|clsHedgeAlgo|clsExecBrkrAlgo|clsExecBrkrCode|clsExecBkkrTags|modifiedBy|modifiedIn|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 = 'PositionHedgePolicyConfig'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'enabled|hedgeDeltaRule|binaryDays|balanceSymbols|hedgeAlgo|execBrkrAlgo|execBrkrCode|execBkkrTags|eodHedgeWindow|eodSymHedgeBandDD|eodSymHedgeBandGR|eodBalanceSymbols|eodHedgeAlgo|eodExecBrkrAlgo|eodExecBrkrCode|eodExecBkkrTags|clsHedgeWindow|clsAuctionSymHedgeBandDD|clsAuctionSymHedgeBandGR|clsSymHedgeBandDD|clsSymHedgeBandGR|clsBalanceSymbols|clsHedgeAlgo|clsExecBrkrAlgo|clsExecBrkrCode|clsExecBkkrTags|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 = 'enabled: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=PositionHedgePolicyConfig' \
--data-urlencode 'view=enabled|hedgeDeltaRule|binaryDays|balanceSymbols|hedgeAlgo|execBrkrAlgo|execBrkrCode|execBkkrTags|eodHedgeWindow|eodSymHedgeBandDD|eodSymHedgeBandGR|eodBalanceSymbols|eodHedgeAlgo|eodExecBrkrAlgo|eodExecBrkrCode|eodExecBkkrTags|clsHedgeWindow|clsAuctionSymHedgeBandDD|clsAuctionSymHedgeBandGR|clsSymHedgeBandDD|clsSymHedgeBandGR|clsBalanceSymbols|clsHedgeAlgo|clsExecBrkrAlgo|clsExecBrkrCode|clsExecBkkrTags|modifiedBy|modifiedIn|timestamp' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=enabled: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 = 'PositionHedgePolicyConfig'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'enabled|hedgeDeltaRule|binaryDays|balanceSymbols|hedgeAlgo|execBrkrAlgo|execBrkrCode|execBkkrTags|eodHedgeWindow|eodSymHedgeBandDD|eodSymHedgeBandGR|eodBalanceSymbols|eodHedgeAlgo|eodExecBrkrAlgo|eodExecBrkrCode|eodExecBkkrTags|clsHedgeWindow|clsAuctionSymHedgeBandDD|clsAuctionSymHedgeBandGR|clsSymHedgeBandDD|clsSymHedgeBandGR|clsBalanceSymbols|clsHedgeAlgo|clsExecBrkrAlgo|clsExecBrkrCode|clsExecBkkrTags|modifiedBy|modifiedIn|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'enabled|hedgeDeltaRule|balanceSymbols|hedgeAlgo|eodHedgeWindow|eodBalanceSymbols|eodHedgeAlgo|clsHedgeWindow|clsBalanceSymbols|clsHedgeAlgo|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)
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=PositionHedgePolicyConfig' \
--data-urlencode 'measure=enabled|hedgeDeltaRule|binaryDays|balanceSymbols|hedgeAlgo|execBrkrAlgo|execBrkrCode|execBkkrTags|eodHedgeWindow|eodSymHedgeBandDD|eodSymHedgeBandGR|eodBalanceSymbols|eodHedgeAlgo|eodExecBrkrAlgo|eodExecBrkrCode|eodExecBkkrTags|clsHedgeWindow|clsAuctionSymHedgeBandDD|clsAuctionSymHedgeBandGR|clsSymHedgeBandDD|clsSymHedgeBandGR|clsBalanceSymbols|clsHedgeAlgo|clsExecBrkrAlgo|clsExecBrkrCode|clsExecBkkrTags|modifiedBy|modifiedIn|timestamp' \
--data-urlencode 'group=enabled|hedgeDeltaRule|balanceSymbols|hedgeAlgo|eodHedgeWindow|eodBalanceSymbols|eodHedgeAlgo|clsHedgeWindow|clsBalanceSymbols|clsHedgeAlgo|modifiedIn' \
--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 = 'PositionHedgePolicyConfig'
# 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=PositionHedgePolicyConfig' \
--data-urlencode 'where=accnt:eq:ExampleString'
Post 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'
# 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": "PositionHedgePolicyConfig"
},
"message": {
"pkey": {
"accnt": "exampleString", // string
"clientFirm": "exampleString", // string
"policy": "enumValue" // enum(PositionHedgePolicy) - None Default A B C D
},
"enabled": "enumValue", // enum(YesNo) - None, Yes, No
"hedgeDeltaRule": "enumValue", // enum(HedgeDeltaRule) - None, IVol, IvS, TVol, TvS, Binary, IvS_25, IvS_50, IvS_75, TvAll, TvAllS
"binaryDays": 1.0, // float
"balanceSymbols": "enumValue", // enum(YesNo) - None, Yes, No
"hedgeAlgo": "enumValue", // enum(HedgeAlgo) - None, SR_VWAP, SR_PASSIVE, BROKER_ALGO
"execBrkrAlgo": "exampleString", // string
"execBrkrCode": "exampleString", // string
"execBkkrTags": "exampleString", // text1
"eodHedgeWindow": "enumValue", // enum(HedgeWindow) - None, Sec_10, Sec_30, Sec_60, Min_1, Min_10, Min_30
"eodSymHedgeBandDD": 1.0, // float
"eodSymHedgeBandGR": 1.0, // float
"eodBalanceSymbols": "enumValue", // enum(YesNo) - None, Yes, No
"eodHedgeAlgo": "enumValue", // enum(HedgeAlgo) - None, SR_VWAP, SR_PASSIVE, BROKER_ALGO
"eodExecBrkrAlgo": "exampleString", // string
"eodExecBrkrCode": "exampleString", // string
"eodExecBkkrTags": "exampleString", // text1
"clsHedgeWindow": "enumValue", // enum(ClsHedgeWindow) - None, NoAction, CloseAuction, CloseAuctionOrAlgo
"clsAuctionSymHedgeBandDD": 1.0, // float
"clsAuctionSymHedgeBandGR": 1.0, // float
"clsSymHedgeBandDD": 1.0, // float
"clsSymHedgeBandGR": 1.0, // float
"clsBalanceSymbols": "enumValue", // enum(YesNo) - None, Yes, No
"clsHedgeAlgo": "enumValue", // enum(ClsHedgeAlgo) - None, SR_SWEEP, BRKR_ALGO
"clsExecBrkrAlgo": "exampleString", // string
"clsExecBrkrCode": "exampleString", // string
"clsExecBkkrTags": "exampleString", // text1
"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
{
"hedgeTime": "12:00:00.000000", // HH:mm:ss.SSSSSS
"symHedgeBandDD": 1.0, // float
"symHedgeBandGR": 1.0 // float
}
]
}
}
response = requests.post(MLINK_PROD_URL, params=params, json=payload)
curl -X POST 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=postmsgs' \
--data-urlencode 'postaction=I' \ # (I)nsert, (U)pdate, (R)eplace, or (D)elete
--data-urlencode 'postmerge=Y' \ # (Y)es or (N)o
--header 'Content-Type: application/json' \
--data '{
"header": {
"mTyp": "PositionHedgePolicyConfig"
},
"message": {
"pkey": {
"accnt": "exampleString", // string
"clientFirm": "exampleString", // string
"policy": "enumValue" // enum(PositionHedgePolicy) - None Default A B C D
},
"enabled": "enumValue", // enum(YesNo) - None, Yes, No
"hedgeDeltaRule": "enumValue", // enum(HedgeDeltaRule) - None, IVol, IvS, TVol, TvS, Binary, IvS_25, IvS_50, IvS_75, TvAll, TvAllS
"binaryDays": 1.0, // float
"balanceSymbols": "enumValue", // enum(YesNo) - None, Yes, No
"hedgeAlgo": "enumValue", // enum(HedgeAlgo) - None, SR_VWAP, SR_PASSIVE, BROKER_ALGO
"execBrkrAlgo": "exampleString", // string
"execBrkrCode": "exampleString", // string
"execBkkrTags": "exampleString", // text1
"eodHedgeWindow": "enumValue", // enum(HedgeWindow) - None, Sec_10, Sec_30, Sec_60, Min_1, Min_10, Min_30
"eodSymHedgeBandDD": 1.0, // float
"eodSymHedgeBandGR": 1.0, // float
"eodBalanceSymbols": "enumValue", // enum(YesNo) - None, Yes, No
"eodHedgeAlgo": "enumValue", // enum(HedgeAlgo) - None, SR_VWAP, SR_PASSIVE, BROKER_ALGO
"eodExecBrkrAlgo": "exampleString", // string
"eodExecBrkrCode": "exampleString", // string
"eodExecBkkrTags": "exampleString", // text1
"clsHedgeWindow": "enumValue", // enum(ClsHedgeWindow) - None, NoAction, CloseAuction, CloseAuctionOrAlgo
"clsAuctionSymHedgeBandDD": 1.0, // float
"clsAuctionSymHedgeBandGR": 1.0, // float
"clsSymHedgeBandDD": 1.0, // float
"clsSymHedgeBandGR": 1.0, // float
"clsBalanceSymbols": "enumValue", // enum(YesNo) - None, Yes, No
"clsHedgeAlgo": "enumValue", // enum(ClsHedgeAlgo) - None, SR_SWEEP, BRKR_ALGO
"clsExecBrkrAlgo": "exampleString", // string
"clsExecBrkrCode": "exampleString", // string
"clsExecBkkrTags": "exampleString", // text1
"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
{
"hedgeTime": "12:00:00.000000", // HH:mm:ss.SSSSSS
"symHedgeBandDD": 1.0, // float
"symHedgeBandGR": 1.0 // float
}
]
}
}'