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

Function processSymbolSamplesMsg

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

Source from the content-addressed store, hash-verified

525}
526
527function processSymbolSamplesMsg(d: Decoder, fields: Iterator<string>): void {
528 decodeInt(fields) // msgId
529 const reqId = decodeInt(fields)
530 const nContractDescriptions = decodeInt(fields)
531 const contractDescriptions: ContractDescription[] = []
532 for (let i = 0; i < nContractDescriptions; i++) {
533 const conDesc = new ContractDescription()
534 conDesc.contract.conId = decodeInt(fields)
535 conDesc.contract.symbol = decodeStr(fields)
536 conDesc.contract.secType = coerceSecType(decodeStr(fields))
537 conDesc.contract.primaryExchange = decodeStr(fields)
538 conDesc.contract.currency = decodeStr(fields)
539
540 const nDerivativeSecTypes = decodeInt(fields)
541 conDesc.derivativeSecTypes = []
542 for (let j = 0; j < nDerivativeSecTypes; j++) {
543 conDesc.derivativeSecTypes.push(decodeStr(fields))
544 }
545 contractDescriptions.push(conDesc)
546
547 if (d.serverVersion >= MIN_SERVER_VER_BOND_ISSUERID) {
548 conDesc.contract.description = decodeStr(fields)
549 conDesc.contract.issuerId = decodeStr(fields)
550 }
551 }
552
553 d.wrapper.symbolSamples(reqId, contractDescriptions)
554}
555
556function processDeltaNeutralValidationMsg(d: Decoder, fields: Iterator<string>): void {
557 decodeInt(fields) // msgId

Callers

nothing calls this directly

Calls 5

coerceSecTypeFunction · 0.85
pushMethod · 0.65
symbolSamplesMethod · 0.65
decodeIntFunction · 0.50
decodeStrFunction · 0.50

Tested by

no test coverage detected