Skip to content

Commit

Permalink
Merge pull request #233 from ceddybi/fix-multiplier
Browse files Browse the repository at this point in the history
fix(multiplier): readInt to readDouble
  • Loading branch information
ceddybi authored Jan 9, 2025
2 parents 71550cb + e2742ab commit 4aeee5c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/io/decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ export class Decoder {
contract.right = validateOptionType(this.readStr() as OptionType);

if (version >= 7) {
contract.multiplier = this.readInt();
contract.multiplier = this.readDouble();
contract.primaryExch = this.readStr();
}

Expand Down Expand Up @@ -979,7 +979,7 @@ export class Decoder {
) {
this.readInt(); // mdSizeMultiplier - not used anymore
}
contract.contract.multiplier = this.readInt();
contract.contract.multiplier = this.readDouble();
contract.orderTypes = this.readStr();
contract.validExchanges = this.readStr();

Expand Down Expand Up @@ -1132,7 +1132,7 @@ export class Decoder {
contract.right = validateOptionType(this.readStr() as OptionType);

if (version >= 9) {
contract.multiplier = this.readInt();
contract.multiplier = this.readDouble();
}

contract.exchange = this.readStr();
Expand Down Expand Up @@ -1894,7 +1894,7 @@ export class Decoder {
contract.lastTradeDateOrContractMonth = this.readStr();
contract.strike = this.readDouble();
contract.right = validateOptionType(this.readStr() as OptionType);
contract.multiplier = this.readInt();
contract.multiplier = this.readDouble();
contract.exchange = this.readStr();
contract.currency = this.readStr();
contract.localSymbol = this.readStr();
Expand Down Expand Up @@ -1982,7 +1982,7 @@ export class Decoder {
contract.lastTradeDateOrContractMonth = this.readStr();
contract.strike = this.readDouble();
contract.right = validateOptionType(this.readStr() as OptionType);
contract.multiplier = this.readInt();
contract.multiplier = this.readDouble();
contract.exchange = this.readStr();
contract.currency = this.readStr();
contract.localSymbol = this.readStr();
Expand Down Expand Up @@ -2053,7 +2053,7 @@ export class Decoder {
const exchange = this.readStr();
const underlyingConId = this.readInt();
const tradingClass = this.readStr();
const multiplier = this.readStr();
const multiplier = this.readDouble();
const expCount = this.readInt();
const expirations: unknown[] = [];

Expand Down

0 comments on commit 4aeee5c

Please sign in to comment.