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

Function processHistogramData

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

Source from the content-addressed store, hash-verified

214}
215
216function processHistogramData(d: Decoder, fields: Iterator<string>): void {
217 decodeInt(fields) // msgId
218 const reqId = decodeInt(fields)
219 const numPoints = decodeInt(fields)
220
221 const histogram: HistogramData[] = []
222 for (let i = 0; i < numPoints; i++) {
223 const dataPoint = new HistogramData()
224 dataPoint.price = decodeFloat(fields)
225 dataPoint.size = decodeDecimal(fields)
226 histogram.push(dataPoint)
227 }
228
229 d.wrapper.histogramData(reqId, histogram)
230}
231
232function processHistoricalTicks(d: Decoder, fields: Iterator<string>): void {
233 decodeInt(fields) // msgId

Callers

nothing calls this directly

Calls 5

decodeFloatFunction · 0.85
decodeDecimalFunction · 0.85
pushMethod · 0.65
histogramDataMethod · 0.65
decodeIntFunction · 0.50

Tested by

no test coverage detected