Schema: EdgeParentBracket (ID: 7945)
METADATA
| Attribute | Value |
|---|---|
| Topic | 7930-edge-generator |
| MLink Token | ClientTrading |
| MLink Endpoint | MLink-Order |
Note: The symbol
=next to a field number indicates that it is a primary key.
BODY
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 10= | accnt | string(16) | ||
| 11= | cfirm | string(16) | ||
| 12= | secKey | OptionKey | the only (or lead) leg | |
| 13= | secType | enum : SpdrKeyType | ||
| 14= | strategyCode | string(64) | slot owner; the ladder writes 'Ladder' | |
| 15= | bracketNumber | long | client-minted guid; one bracket per record | |
| 100 | enabled | enum : YesNo | No = pull the entry | |
| 103 | slotVersion | ushort | bumped by the write door on each replace | |
| 106 | slotNumber | long | incarnation; a new one after a restart | |
| 109 | tradeDate | DateKey | ||
| 112 | side | enum : BuySell | ||
| 115 | orderSize | int | ||
| 118 | priceFormat | enum : PriceFormat | ||
| 121 | restPrc | double | make leg rest price; 0 = no make leg | |
| 124 | capPrc | double | take leg cap (hard worst price) | |
| 127 | takeMode | enum : EdgeTakeMode | None = no take leg | |
| 130 | stopPrc | double | StopPrint level | |
| 133 | maxExposureSize | int | -1 = orderSize (no overfill) | |
| 136 | exitStopTicks | int | 0 = no exit stop | |
| 139 | exitStopCapTicks | int | take cap past the exit stop level | |
| 142 | exitTrailTicks | int | 0 = static | |
| 145 | exitBreakevenAfterSlice | byte | move the exit stop to breakeven once this ScaleOutTargets row has filled; 0 = never | |
| 148 | exitBreakevenTicks | int | breakeven stop level, ticks past the average fill in the position's favor | |
| 184 | modelSetId | int | 0 = any | |
| 187 | userName | string(24) | stamped by the write door | |
| 190 | modifiedBy | string(24) | ||
| 193 | timestamp | long | ||
| 196 | role | enum : BracketRole | Exit = minted by the host from an entry's fills; refuses tool writes | |
| 199 | entryBracketNumber | long | on an exit: the entry it protects | |
| 202 | workPrc | double | on a served slot: where the host is working it now (parked cap, trailed or breakeven stop); 0 = at the intent price | |
| 205 | pullExits | enum : YesNo | on a Delete of an entry: also pull its exits |
REPEATING FIELDS
BracketLegs
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 303 | legIndex | byte | 1-based, strictly increasing | |
| 306 | legSecKey | OptionKey | concrete leg; empty when a band | |
| 309 | legSecType | enum : SpdrKeyType | ||
| 312 | legSide | enum : BuySell | ||
| 315 | legRatio | ushort | >= 1 | |
| 318 | legRole | enum : EdgeLegRole | ||
| 321 | legBandRule | enum : EdgeLegBand | band leg selection, resolved on the host | |
| 324 | legTicker | TickerKey | band leg product | |
| 327 | legExpiry | DateKey | ||
| 330 | legCallPut | enum : CallPut | ||
| 333 | legMinStrike | double | band bounds; 0/0 = every strike in the expiry | |
| 336 | legMaxStrike | double | ||
| 339 | legTargetDelta | float | TargetDelta rule | |
| 345 | legRefIndex | byte | tied pricing reference: 0 = own underlier, else another leg's index (342 legEdgeExDest reserved) |
ScaleOutTargets
| # | Field | Type | Default Value | Comment |
|---|---|---|---|---|
| 403 | targetTicks | int | strictly increasing by row | |
| 406 | size | int | package units; 0 on the last row = remainder |
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 = 'EdgeParentBracket'
# 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=EdgeParentBracket'
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 = 'EdgeParentBracket'
# 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|slotVersion|slotNumber|tradeDate|side|orderSize|priceFormat|restPrc|capPrc|takeMode|stopPrc|maxExposureSize|exitStopTicks|exitStopCapTicks|exitTrailTicks|exitBreakevenAfterSlice|exitBreakevenTicks|modelSetId|userName|modifiedBy|timestamp|role|entryBracketNumber|workPrc|pullExits'
# 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=EdgeParentBracket' \
--data-urlencode 'view=enabled|slotVersion|slotNumber|tradeDate|side|orderSize|priceFormat|restPrc|capPrc|takeMode|stopPrc|maxExposureSize|exitStopTicks|exitStopCapTicks|exitTrailTicks|exitBreakevenAfterSlice|exitBreakevenTicks|modelSetId|userName|modifiedBy|timestamp|role|entryBracketNumber|workPrc|pullExits' \
--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 = 'EdgeParentBracket'
# 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|slotVersion|slotNumber|tradeDate|side|orderSize|priceFormat|restPrc|capPrc|takeMode|stopPrc|maxExposureSize|exitStopTicks|exitStopCapTicks|exitTrailTicks|exitBreakevenAfterSlice|exitBreakevenTicks|modelSetId|userName|modifiedBy|timestamp|role|entryBracketNumber|workPrc|pullExits'
# 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=EdgeParentBracket' \
--data-urlencode 'view=enabled|slotVersion|slotNumber|tradeDate|side|orderSize|priceFormat|restPrc|capPrc|takeMode|stopPrc|maxExposureSize|exitStopTicks|exitStopCapTicks|exitTrailTicks|exitBreakevenAfterSlice|exitBreakevenTicks|modelSetId|userName|modifiedBy|timestamp|role|entryBracketNumber|workPrc|pullExits' \
--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 = 'EdgeParentBracket'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'enabled|slotVersion|slotNumber|tradeDate|side|orderSize|priceFormat|restPrc|capPrc|takeMode|stopPrc|maxExposureSize|exitStopTicks|exitStopCapTicks|exitTrailTicks|exitBreakevenAfterSlice|exitBreakevenTicks|modelSetId|userName|modifiedBy|timestamp|role|entryBracketNumber|workPrc|pullExits'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'enabled|side|priceFormat|takeMode|role|pullExits'
# 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=EdgeParentBracket' \
--data-urlencode 'measure=enabled|slotVersion|slotNumber|tradeDate|side|orderSize|priceFormat|restPrc|capPrc|takeMode|stopPrc|maxExposureSize|exitStopTicks|exitStopCapTicks|exitTrailTicks|exitBreakevenAfterSlice|exitBreakevenTicks|modelSetId|userName|modifiedBy|timestamp|role|entryBracketNumber|workPrc|pullExits' \
--data-urlencode 'group=enabled|side|priceFormat|takeMode|role|pullExits' \
--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 = 'EdgeParentBracket'
# 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=EdgeParentBracket' \
--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": "U", # (U)pdate, (I)nsert, or (R)eplace
"postmerge": "Y", # (Y)es or (N)o
}
payload = {
"header": {
"mTyp": "EdgeParentBracket"
},
"message": {
"pkey": {
"accnt": "exampleString", // string
"cfirm": "exampleString", // string
"secKey": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL",
"dt": "2025-01-01",
"xx": 1,
"cp": "Call"
},
"secType": "enumValue", // enum(SpdrKeyType) - None, Stock, Future, Option, MLeg
"strategyCode": "exampleString", // string
"bracketNumber": 1 // long
},
"enabled": "enumValue", // enum(YesNo) - None, Yes, No
"slotVersion": 1, // ushort
"slotNumber": 1, // long
"tradeDate": "2025-01-01", // yyyy-MM-dd
"side": "enumValue", // enum(BuySell) - None, Buy, Sell
"orderSize": 1, // int
"priceFormat": "enumValue", // enum(PriceFormat) - None, N0, N1, N2, N3, N4, N5, N6, N7, F4, F8, Q8, F16, F32, H32, Q32, F64, H64, FullPenny, PartPenny, PartNickle, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, A0, A1, A2, A3, A4, A5, A6, A7, E32, EU2A, EU2B, EU2C, EU2D, EU2E, EU2F, EU3A, EU3B, EU3C, EU3D, EU3E, EU3F, EU3G, EU3H, EU3I, EU3J, EU4A, EU4B, EU4C, EU5A, EU5B, NMS_Penny, NMS_Nickle, NMS_HalfPenny, EQT, EU2G, EU4D, EU5C, EU5D, EU7A, EU10A, EU12A, EU14A, EU15A, EU16A, EU17A, EU18A, EU19A, EU19B, EU19C, V17, V18
"restPrc": 1.0, // double
"capPrc": 1.0, // double
"takeMode": "enumValue", // enum(EdgeTakeMode) - None, TakeNow, StopPrint
"stopPrc": 1.0, // double
"maxExposureSize": 1, // int
"exitStopTicks": 1, // int
"exitStopCapTicks": 1, // int
"exitTrailTicks": 1, // int
"exitBreakevenAfterSlice": 1, // byte
"exitBreakevenTicks": 1, // int
"modelSetId": 1, // int
"userName": "exampleString", // string
"modifiedBy": "exampleString", // string
"timestamp": 1, // long
"role": "enumValue", // enum(BracketRole) - Entry, Exit
"entryBracketNumber": 1, // long
"workPrc": 1.0, // double
"pullExits": "enumValue", // enum(YesNo) - None, Yes, No
"BracketLegs": [ // Repeating Field
{
"legIndex": 1, // byte
"legSecKey": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL",
"dt": "2025-01-01",
"xx": 1,
"cp": "Call"
},
"legSecType": "enumValue", // enum(SpdrKeyType) - None, Stock, Future, Option, MLeg
"legSide": "enumValue", // enum(BuySell) - None, Buy, Sell
"legRatio": 1, // ushort
"legRole": "enumValue", // enum(EdgeLegRole) - Any, Lead, Hedge
"legBandRule": "enumValue", // enum(EdgeLegBand) - None, NearestAtm, TargetDelta
"legTicker": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL"
},
"legExpiry": "2025-01-01", // yyyy-MM-dd
"legCallPut": "enumValue", // enum(CallPut) - Call, Put, Pair
"legMinStrike": 1.0, // double
"legMaxStrike": 1.0, // double
"legTargetDelta": 1.0, // float
"legRefIndex": 1 // byte
}
],
"ScaleOutTargets": [ // Repeating Field
{
"targetTicks": 1, // int
"size": 1 // int
}
]
}
}
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=U' \ # (U)pdate, (I)nsert, or (R)eplace
--data-urlencode 'postmerge=Y' \ # (Y)es or (N)o
--header 'Content-Type: application/json' \
--data '{
"header": {
"mTyp": "EdgeParentBracket"
},
"message": {
"pkey": {
"accnt": "exampleString", // string
"cfirm": "exampleString", // string
"secKey": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL",
"dt": "2025-01-01",
"xx": 1,
"cp": "Call"
},
"secType": "enumValue", // enum(SpdrKeyType) - None, Stock, Future, Option, MLeg
"strategyCode": "exampleString", // string
"bracketNumber": 1 // long
},
"enabled": "enumValue", // enum(YesNo) - None, Yes, No
"slotVersion": 1, // ushort
"slotNumber": 1, // long
"tradeDate": "2025-01-01", // yyyy-MM-dd
"side": "enumValue", // enum(BuySell) - None, Buy, Sell
"orderSize": 1, // int
"priceFormat": "enumValue", // enum(PriceFormat) - None, N0, N1, N2, N3, N4, N5, N6, N7, F4, F8, Q8, F16, F32, H32, Q32, F64, H64, FullPenny, PartPenny, PartNickle, V1, V2, V3, V4, V5, V6, V7, V8, V9, V10, V11, V12, V13, V14, V15, V16, A0, A1, A2, A3, A4, A5, A6, A7, E32, EU2A, EU2B, EU2C, EU2D, EU2E, EU2F, EU3A, EU3B, EU3C, EU3D, EU3E, EU3F, EU3G, EU3H, EU3I, EU3J, EU4A, EU4B, EU4C, EU5A, EU5B, NMS_Penny, NMS_Nickle, NMS_HalfPenny, EQT, EU2G, EU4D, EU5C, EU5D, EU7A, EU10A, EU12A, EU14A, EU15A, EU16A, EU17A, EU18A, EU19A, EU19B, EU19C, V17, V18
"restPrc": 1.0, // double
"capPrc": 1.0, // double
"takeMode": "enumValue", // enum(EdgeTakeMode) - None, TakeNow, StopPrint
"stopPrc": 1.0, // double
"maxExposureSize": 1, // int
"exitStopTicks": 1, // int
"exitStopCapTicks": 1, // int
"exitTrailTicks": 1, // int
"exitBreakevenAfterSlice": 1, // byte
"exitBreakevenTicks": 1, // int
"modelSetId": 1, // int
"userName": "exampleString", // string
"modifiedBy": "exampleString", // string
"timestamp": 1, // long
"role": "enumValue", // enum(BracketRole) - Entry, Exit
"entryBracketNumber": 1, // long
"workPrc": 1.0, // double
"pullExits": "enumValue", // enum(YesNo) - None, Yes, No
"BracketLegs": [ // Repeating Field
{
"legIndex": 1, // byte
"legSecKey": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL",
"dt": "2025-01-01",
"xx": 1,
"cp": "Call"
},
"legSecType": "enumValue", // enum(SpdrKeyType) - None, Stock, Future, Option, MLeg
"legSide": "enumValue", // enum(BuySell) - None, Buy, Sell
"legRatio": 1, // ushort
"legRole": "enumValue", // enum(EdgeLegRole) - Any, Lead, Hedge
"legBandRule": "enumValue", // enum(EdgeLegBand) - None, NearestAtm, TargetDelta
"legTicker": {
"at": "EQT",
"ts": "NMS",
"tk": "AAPL"
},
"legExpiry": "2025-01-01", // yyyy-MM-dd
"legCallPut": "enumValue", // enum(CallPut) - Call, Put, Pair
"legMinStrike": 1.0, // double
"legMaxStrike": 1.0, // double
"legTargetDelta": 1.0, // float
"legRefIndex": 1 // byte
}
],
"ScaleOutTargets": [ // Repeating Field
{
"targetTicks": 1, // int
"size": 1 // int
}
]
}
}'