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

Method decodeLmtPrice

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

Source from the content-addressed store, hash-verified

101 }
102
103 decodeLmtPrice(fields: Iterator<string>): void {
104 if (this.version < 29) {
105 // Pre-v29: empty wire field meant 0 (not unset). Preserve that.
106 const raw = decodeDecimal(fields)
107 this.order.lmtPrice = raw.equals(UNSET_DECIMAL) ? new Decimal(0) : raw
108 } else {
109 this.order.lmtPrice = decodeDecimal(fields)
110 }
111 }
112
113 decodeAuxPrice(fields: Iterator<string>): void {
114 if (this.version < 30) {

Callers 1

applyOrderHandlersFunction · 0.95

Calls 1

decodeDecimalFunction · 0.85

Tested by

no test coverage detected