Showing 497 of 497 total issues

Avoid too many return statements within this function.
Open

        return this.emitError(
          "It does not support professional customer parameter in exerciseOptions.",
          ErrorCode.UPDATE_TWS,
          tickerId,
        );
Severity: Major
Found in src/core/io/encoder.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return this.emitError(
              "It does not support algo orders.",
              ErrorCode.UPDATE_TWS,
              id,
            );
    Severity: Major
    Found in src/core/io/encoder.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return this.emitError(
                "It does not support cash quantity parameter",
                ErrorCode.UPDATE_TWS,
                id,
              );
      Severity: Major
      Found in src/core/io/encoder.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return this.emitError(
                "It does not support autoCancelParent attribute",
                ErrorCode.UPDATE_TWS,
                id,
              );
        Severity: Major
        Found in src/core/io/encoder.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return this.emitError(
                    "It does not support scaleTable, activeStartTime and activeStopTime parameters.",
                    ErrorCode.UPDATE_TWS,
                    id,
                  );
          Severity: Major
          Found in src/core/io/encoder.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return this.emitError(
                    "It does not support price management algo parameter",
                    ErrorCode.UPDATE_TWS,
                    id,
                  );
            Severity: Major
            Found in src/core/io/encoder.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return this.emitError(
                        "It does not support exemptCode parameter.",
                        ErrorCode.UPDATE_TWS,
                        id,
                      );
              Severity: Major
              Found in src/core/io/encoder.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return this.emitError(
                        "It does not support postToAts attribute",
                        ErrorCode.UPDATE_TWS,
                        id,
                      );
                Severity: Major
                Found in src/core/io/encoder.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return this.emitError(
                          "It does not support manual order time attribute",
                          ErrorCode.UPDATE_TWS,
                          id,
                        );
                  Severity: Major
                  Found in src/core/io/encoder.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return this.emitError(
                              "It does not support customer account parameter",
                              ErrorCode.UPDATE_TWS,
                              id,
                            );
                    Severity: Major
                    Found in src/core/io/encoder.ts - About 30 mins to fix

                      Similar blocks of code found in 5 locations. Consider refactoring.
                      Open

                        reqSecDefOptParams(
                          reqId: number,
                          underlyingSymbol: string,
                          futFopExchange: string,
                          underlyingSecType: string,
                      Severity: Major
                      Found in src/api/api.ts and 4 other locations - About 30 mins to fix
                      src/api/api.ts on lines 876..893
                      src/api/api.ts on lines 1129..1146
                      src/api/api.ts on lines 1212..1229
                      src/api/api.ts on lines 1518..1535

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 5 locations. Consider refactoring.
                      Open

                        cancelMktData(tickerId: number): void {
                          const version = 1;
                      
                          this.sendMsg(OUT_MSG_ID.CANCEL_MKT_DATA, version, tickerId);
                        }
                      Severity: Major
                      Found in src/core/io/encoder.ts and 4 other locations - About 30 mins to fix
                      src/core/io/encoder.ts on lines 403..407
                      src/core/io/encoder.ts on lines 2403..2407
                      src/core/io/encoder.ts on lines 2937..2941
                      src/core/io/encoder.ts on lines 2964..2968

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 3 locations. Consider refactoring.
                      Open

                        on(
                          event: EventName.deltaNeutralValidation,
                          listener: (
                            reqId: number,
                            deltaNeutralContract: DeltaNeutralContract,
                      Severity: Minor
                      Found in src/api/api.ts and 2 other locations - About 30 mins to fix
                      src/api/api.ts on lines 1879..1882
                      src/api/api.ts on lines 1982..1985

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 5 locations. Consider refactoring.
                      Open

                        reqHeadTimestamp(
                          reqId: number,
                          contract: Contract,
                          whatToShow: WhatToShow,
                          useRTH: boolean,
                      Severity: Major
                      Found in src/api/api.ts and 4 other locations - About 30 mins to fix
                      src/api/api.ts on lines 1129..1146
                      src/api/api.ts on lines 1212..1229
                      src/api/api.ts on lines 1459..1476
                      src/api/api.ts on lines 1518..1535

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 5 locations. Consider refactoring.
                      Open

                        reqMktDepth(
                          reqId: number,
                          contract: Contract,
                          numRows: number,
                          isSmartDepth: boolean,
                      Severity: Major
                      Found in src/api/api.ts and 4 other locations - About 30 mins to fix
                      src/api/api.ts on lines 876..893
                      src/api/api.ts on lines 1212..1229
                      src/api/api.ts on lines 1459..1476
                      src/api/api.ts on lines 1518..1535

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 5 locations. Consider refactoring.
                      Open

                        unsubscribeToGroupEvents(reqId: number): void {
                          const version = 1;
                      
                          this.sendMsg(OUT_MSG_ID.UNSUBSCRIBE_FROM_GROUP_EVENTS, version, reqId);
                        }
                      Severity: Major
                      Found in src/core/io/encoder.ts and 4 other locations - About 30 mins to fix
                      src/core/io/encoder.ts on lines 403..407
                      src/core/io/encoder.ts on lines 480..484
                      src/core/io/encoder.ts on lines 2403..2407
                      src/core/io/encoder.ts on lines 2937..2941

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Identical blocks of code found in 2 locations. Consider refactoring.
                      Open

                        stop() {
                          console.log("app stopping.");
                          this.subscription$?.unsubscribe();
                          this.exit();
                        }
                      Severity: Minor
                      Found in src/tools/open-orders.ts and 1 other location - About 30 mins to fix
                      src/tools/open-orders-auto.ts on lines 55..59

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 5 locations. Consider refactoring.
                      Open

                        reqMktData(
                          reqId: number,
                          contract: Contract,
                          genericTickList: string,
                          snapshot: boolean,
                      Severity: Major
                      Found in src/api/api.ts and 4 other locations - About 30 mins to fix
                      src/api/api.ts on lines 876..893
                      src/api/api.ts on lines 1129..1146
                      src/api/api.ts on lines 1459..1476
                      src/api/api.ts on lines 1518..1535

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 5 locations. Consider refactoring.
                      Open

                        cancelAccountUpdatesMulti(reqId: number): void {
                          const version = 2;
                      
                          this.sendMsg(OUT_MSG_ID.CANCEL_ACCOUNT_UPDATES_MULTI, version, reqId);
                        }
                      Severity: Major
                      Found in src/core/io/encoder.ts and 4 other locations - About 30 mins to fix
                      src/core/io/encoder.ts on lines 480..484
                      src/core/io/encoder.ts on lines 2403..2407
                      src/core/io/encoder.ts on lines 2937..2941
                      src/core/io/encoder.ts on lines 2964..2968

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Similar blocks of code found in 3 locations. Consider refactoring.
                      Open

                        on(
                          event: EventName.contractDetails,
                          listener: (reqId: number, contractDetails: ContractDetails) => void,
                        ): this;
                      Severity: Minor
                      Found in src/api/api.ts and 2 other locations - About 30 mins to fix
                      src/api/api.ts on lines 1879..1882
                      src/api/api.ts on lines 2024..2030

                      Duplicated Code

                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                      Tuning

                      This issue has a mass of 45.

                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                      Refactorings

                      Further Reading

                      Severity
                      Category
                      Status
                      Source
                      Language