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

Function processRealTimeBarMsg

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

Source from the content-addressed store, hash-verified

186}
187
188function processRealTimeBarMsg(d: Decoder, fields: Iterator<string>): void {
189 decodeInt(fields) // msgId
190 decodeInt(fields) // version
191 const reqId = decodeInt(fields)
192
193 const bar = new RealTimeBar()
194 bar.time = decodeInt(fields)
195 bar.open_ = decodeFloat(fields)
196 bar.high = decodeFloat(fields)
197 bar.low = decodeFloat(fields)
198 bar.close = decodeFloat(fields)
199 bar.volume = decodeDecimal(fields)
200 bar.wap = decodeDecimal(fields)
201 bar.count = decodeInt(fields)
202
203 d.wrapper.realtimeBar(
204 reqId, bar.time, bar.open_, bar.high, bar.low, bar.close,
205 bar.volume, bar.wap, bar.count,
206 )
207}
208
209function processHeadTimestamp(d: Decoder, fields: Iterator<string>): void {
210 decodeInt(fields) // msgId

Callers

nothing calls this directly

Calls 4

decodeFloatFunction · 0.85
decodeDecimalFunction · 0.85
realtimeBarMethod · 0.65
decodeIntFunction · 0.50

Tested by

no test coverage detected