MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / decodeVolOrderParams

Method decodeVolOrderParams

packages/ibkr/src/order-decoder.ts:274–300  ·  view source on GitHub ↗
(fields: Iterator<string>, readOpenOrderAttribs: boolean)

Source from the content-addressed store, hash-verified

272 }
273
274 decodeVolOrderParams(fields: Iterator<string>, readOpenOrderAttribs: boolean): void {
275 this.order.volatility = decodeFloat(fields, SHOW_UNSET)
276 this.order.volatilityType = decodeInt(fields)
277 this.order.deltaNeutralOrderType = decodeStr(fields)
278 this.order.deltaNeutralAuxPrice = decodeFloat(fields, SHOW_UNSET)
279
280 if (this.version >= 27 && this.order.deltaNeutralOrderType) {
281 this.order.deltaNeutralConId = decodeInt(fields)
282 if (readOpenOrderAttribs) {
283 this.order.deltaNeutralSettlingFirm = decodeStr(fields)
284 this.order.deltaNeutralClearingAccount = decodeStr(fields)
285 this.order.deltaNeutralClearingIntent = decodeStr(fields)
286 }
287 }
288
289 if (this.version >= 31 && this.order.deltaNeutralOrderType) {
290 if (readOpenOrderAttribs) {
291 this.order.deltaNeutralOpenClose = decodeStr(fields)
292 }
293 this.order.deltaNeutralShortSale = decodeBool(fields)
294 this.order.deltaNeutralShortSaleSlot = decodeInt(fields)
295 this.order.deltaNeutralDesignatedLocation = decodeStr(fields)
296 }
297
298 this.order.continuousUpdate = decodeBool(fields)
299 this.order.referencePriceType = decodeInt(fields)
300 }
301
302 decodeTrailParams(fields: Iterator<string>): void {
303 this.order.trailStopPrice = decodeDecimal(fields)

Callers 1

applyOrderHandlersFunction · 0.95

Calls 4

decodeFloatFunction · 0.85
decodeIntFunction · 0.70
decodeStrFunction · 0.70
decodeBoolFunction · 0.70

Tested by

no test coverage detected