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

Function processMarketRuleMsg

packages/ibkr/src/decoder/contract.ts:569–586  ·  view source on GitHub ↗
(d: Decoder, fields: Iterator<string>)

Source from the content-addressed store, hash-verified

567}
568
569function processMarketRuleMsg(d: Decoder, fields: Iterator<string>): void {
570 decodeInt(fields) // msgId
571 const marketRuleId = decodeInt(fields)
572
573 const nPriceIncrements = decodeInt(fields)
574 const priceIncrements: PriceIncrement[] = []
575
576 if (nPriceIncrements > 0) {
577 for (let i = 0; i < nPriceIncrements; i++) {
578 const prcInc = new PriceIncrement()
579 prcInc.lowEdge = decodeFloat(fields)
580 prcInc.increment = decodeFloat(fields)
581 priceIncrements.push(prcInc)
582 }
583 }
584
585 d.wrapper.marketRule(marketRuleId, priceIncrements)
586}
587
588// ---------------------------------------------------------------------------
589// Protobuf handlers

Callers

nothing calls this directly

Calls 4

decodeFloatFunction · 0.85
pushMethod · 0.65
marketRuleMethod · 0.65
decodeIntFunction · 0.50

Tested by

no test coverage detected