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

Method decodeContractFields

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

Source from the content-addressed store, hash-verified

71 }
72
73 decodeContractFields(fields: Iterator<string>): void {
74 this.contract.conId = decodeInt(fields)
75 this.contract.symbol = decodeStr(fields)
76 this.contract.secType = coerceSecType(decodeStr(fields))
77 this.contract.lastTradeDateOrContractMonth = decodeStr(fields)
78 this.contract.strike = decodeFloat(fields)
79 this.contract.right = decodeStr(fields)
80 if (this.version >= 32) {
81 this.contract.multiplier = decodeStr(fields)
82 }
83 this.contract.exchange = decodeStr(fields)
84 this.contract.currency = decodeStr(fields)
85 this.contract.localSymbol = decodeStr(fields)
86 if (this.version >= 32) {
87 this.contract.tradingClass = decodeStr(fields)
88 }
89 }
90
91 decodeAction(fields: Iterator<string>): void {
92 this.order.action = decodeStr(fields)

Callers 1

applyOrderHandlersFunction · 0.95

Calls 4

coerceSecTypeFunction · 0.85
decodeFloatFunction · 0.85
decodeIntFunction · 0.70
decodeStrFunction · 0.70

Tested by

no test coverage detected