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

Method decodeConditions

packages/ibkr/src/order-decoder.ts:528–546  ·  view source on GitHub ↗
(fields: Iterator<string>)

Source from the content-addressed store, hash-verified

526 }
527
528 decodeConditions(fields: Iterator<string>): void {
529 if (this.serverVersion >= MIN_SERVER_VER_PEGGED_TO_BENCHMARK) {
530 const conditionsSize = decodeInt(fields)
531 if (conditionsSize > 0) {
532 this.order.conditions = []
533 for (let i = 0; i < conditionsSize; i++) {
534 const conditionType = decodeInt(fields)
535 const condition = createOrderCondition(conditionType)
536 if (condition) {
537 condition.decode(fields)
538 this.order.conditions.push(condition)
539 }
540 }
541
542 this.order.conditionsIgnoreRth = decodeBool(fields)
543 this.order.conditionsCancelOrder = decodeBool(fields)
544 }
545 }
546 }
547
548 decodeAdjustedOrderParams(fields: Iterator<string>): void {
549 if (this.serverVersion >= MIN_SERVER_VER_PEGGED_TO_BENCHMARK) {

Callers 1

applyOrderHandlersFunction · 0.95

Calls 4

decodeIntFunction · 0.70
decodeBoolFunction · 0.70
decodeMethod · 0.65
pushMethod · 0.65

Tested by

no test coverage detected