Skip to content

Commit

Permalink
Build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rylorin committed Sep 26, 2024
1 parent 853e6cf commit 6c1cd47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bots/yahoo.bot.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { OptionType, SecType } from "@stoqey/ib";
import { Op } from "sequelize";
import yahooFinance from "yahoo-finance2";
import { ExtendedCookieJar, default as yahooFinance } from "yahoo-finance2";
import { Quote } from "yahoo-finance2/dist/esm/src/modules/quote";
import { ITradingBot } from ".";
import { greeks, option_implied_volatility } from "../black_scholes";
Expand Down Expand Up @@ -425,7 +425,8 @@ export class YahooUpdateBot extends ITradingBot {
public start(): void {
this.on("process", () => this.processWrapper());

yahooFinance.setGlobalConfig({ validation: { logErrors: true } });
const cookieJar = new ExtendedCookieJar();
yahooFinance.setGlobalConfig({ validation: { logErrors: true }, cookieJar });
// this.printObject(await yahooFinance.quote("EURUSD=X"));

setTimeout(() => this.emit("process"), 1 * 60 * 1000); // start after 1 min
Expand Down

0 comments on commit 6c1cd47

Please sign in to comment.