From 3fd912fe11a25ff6a1c1ab7bc8f994980ba54a75 Mon Sep 17 00:00:00 2001 From: Ronan-Yann Lorin Date: Sat, 7 Oct 2023 09:39:20 +0200 Subject: [PATCH] reqHistoricalData tests added --- package.json | 12 +- src/api-next/api-next.ts | 4 +- src/api-next/index.ts | 32 +- src/api-next/market-scanner/market-scanner.ts | 219 +----------- src/api/api.ts | 13 +- src/api/historical/bar-size-setting.ts | 4 +- src/api/market-scanner/market-scanner.ts | 213 ++++++++++++ src/index.ts | 9 + src/tests/unit/api/contract-details.test.ts | 18 +- src/tests/unit/api/historical-data.test.ts | 318 ++++++++++++++++++ src/tests/unit/api/market-scanner.test.ts | 8 +- src/tests/unit/api/matching-symbols.test.ts | 4 +- src/tests/unit/api/order/placeOrder.test.ts | 12 +- src/tests/unit/api/wsh-event-data.test.ts | 5 +- yarn.lock | 142 ++++---- 15 files changed, 676 insertions(+), 337 deletions(-) create mode 100644 src/api/market-scanner/market-scanner.ts create mode 100644 src/tests/unit/api/historical-data.test.ts diff --git a/package.json b/package.json index 8ddea7b9..a827f8ea 100644 --- a/package.json +++ b/package.json @@ -74,14 +74,14 @@ "rxjs": "^7.8.1" }, "devDependencies": { - "@types/jest": "^29.5.4", + "@types/jest": "^29.5.5", "@types/node": "^18.17.15", - "@types/source-map-support": "^0.5.7", - "@typescript-eslint/eslint-plugin": "^6.7.0", - "@typescript-eslint/parser": "^6.7.0", + "@types/source-map-support": "^0.5.8", + "@typescript-eslint/eslint-plugin": "^6.7.4", + "@typescript-eslint/parser": "^6.7.4", "ajv": "^8.12.0", - "eslint": "^8.49.0", - "eslint-plugin-jest": "^27.2.3", + "eslint": "^8.51.0", + "eslint-plugin-jest": "^27.4.2", "eslint-plugin-rxjs": "^5.0.3", "jest": "^29.7.0", "jest-environment-node": "^29.7.0", diff --git a/src/api-next/api-next.ts b/src/api-next/api-next.ts index 1518ed41..38c1731f 100644 --- a/src/api-next/api-next.ts +++ b/src/api-next/api-next.ts @@ -1725,7 +1725,7 @@ export class IBApiNext { * - [n] M (months) * - [n] Y (years) * @param barSizeSetting the size of the bar: - * - 1 sec + * - 1 secs * - 5 secs * - 15 secs * - 30 secs @@ -1832,7 +1832,7 @@ export class IBApiNext { * * @param contract The contract for which we want to retrieve the data. * @param barSizeSetting the size of the bar: - * - 1 sec + * - 1 secs * - 5 secs * - 15 secs * - 30 secs diff --git a/src/api-next/index.ts b/src/api-next/index.ts index 327ef656..f88054a8 100644 --- a/src/api-next/index.ts +++ b/src/api-next/index.ts @@ -2,25 +2,22 @@ export { AccountSummaries, + AccountSummariesUpdate, AccountSummaryTagName, AccountSummaryTagValues, AccountSummaryValue, AccountSummaryValues, - AccountSummariesUpdate, } from "./account/account-summary"; -export { - AccountUpdate, - AccountUpdatesUpdate, -} from "./account/account-update"; +export { AccountUpdate, AccountUpdatesUpdate } from "./account/account-update"; // common export { AccountId, ConId, CurrencyCode } from "./common/common-types"; +export { ConnectionState } from "./common/connection-state"; export { IBApiNextError } from "./common/error"; -export { Logger } from "./common/logger"; export { ItemListUpdate } from "./common/item-list-update"; -export { ConnectionState } from "./common/connection-state"; +export { Logger } from "./common/logger"; // contract @@ -29,14 +26,14 @@ export { SecurityDefinitionOptionParameterType } from "./contract/sec-def-opt-pa // market -export { MarketDataType } from "./market/market-data-type"; export { MarketDataTick, MarketDataTicks, MarketDataUpdate, } from "./market/market-data"; -import { TickType as IBApiTickType } from "../api/market/tickType"; +export { MarketDataType } from "./market/market-data-type"; export { IBApiTickType }; +import { TickType as IBApiTickType } from "../api/market/tickType"; import { TickType as IBApiNextTickType } from "./market/tick-type"; export { IBApiNextTickType }; @@ -48,26 +45,35 @@ export { PnLSingle } from "./pnl/pnl-single"; // position export { - Position, AccountPositions, AccountPositionsUpdate, + Position, } from "./position/position"; -// market depth +// Market depth export { + OrderBook, OrderBookRow, OrderBookRowPosition, OrderBookRows, - OrderBook, OrderBookUpdate, } from "./market-depth/order-book"; // Order +export { ExecutionDetail } from "./order/execution-detail"; export { OpenOrder } from "./order/open-order"; export { OpenOrdersUpdate } from "./order/open-order-update"; -export { ExecutionDetail } from "./order/execution-detail"; + +// Market scanner + +export { + MarketScannerItem, + MarketScannerItemRank, + MarketScannerRows, + MarketScannerUpdate, +} from "./market-scanner/market-scanner"; // IBApiNext diff --git a/src/api-next/market-scanner/market-scanner.ts b/src/api-next/market-scanner/market-scanner.ts index 1b7379c1..dd986abc 100644 --- a/src/api-next/market-scanner/market-scanner.ts +++ b/src/api-next/market-scanner/market-scanner.ts @@ -16,216 +16,9 @@ export type MarketScannerRows = Map; export type MarketScannerUpdate = ItemListUpdate; -export enum LocationCode { - BOND_US = "BOND.US", - EFP = "EFP", - // FUT_ECBOT = "FUT.ECBOT", - FUT_EU_BELFOX = "FUT.EU.BELFOX", - // FUT_EU_DTB = "FUT.EU.DTB", - FUT_EU_FTA = "FUT.EU.FTA", - FUT_EU_IDEM = "FUT.EU.IDEM", - FUT_EU_LIFFE = "FUT.EU.LIFFE", - FUT_EU_MEFFRV = "FUT.EU.MEFFRV", - FUT_EU_MONEP = "FUT.EU.MONEP", - FUT_EU = "FUT.EU", - // FUT_GLOBEX = "FUT.GLOBEX", - FUT_HK_HKFE = "FUT.HK.HKFE", - FUT_HK_JAPAN = "FUT.HK.JAPAN", - FUT_HK_KSE = "FUT.HK.KSE", - FUT_HK_NSE = "FUT.HK.NSE", - FUT_HK_OSE_JPN = "FUT.HK.OSE.JPN", - FUT_HK_SGX = "FUT.HK.SGX", - FUT_HK_SNFE = "FUT.HK.SNFE", - FUT_HK_TSE_JPN = "FUT.HK.TSE.JPN", - FUT_HK = "FUT.HK", - FUT_IPE = "FUT.IPE", - FUT_NA_CDE = "FUT.NA.CDE", - FUT_NA = "FUT.NA", - FUT_NYBOT = "FUT.NYBOT", - // FUT_NYMEX = "FUT.NYMEX", - FUT_NYSELIFFE = "FUT.NYSELIFFE", - FUT_US = "FUT.US", - IND_EU_BELFOX = "IND.EU.BELFOX", - // IND_EU_DTB = "IND.EU.DTB", - IND_EU_FTA = "IND.EU.FTA", - IND_EU_LIFFE = "IND.EU.LIFFE", - IND_EU_MONEP = "IND.EU.MONEP", - IND_EU = "IND.EU", - IND_HK_HKFE = "IND.HK.HKFE", - IND_HK_JAPAN = "IND.HK.JAPAN", - IND_HK_KSE = "IND.HK.KSE", - IND_HK_NSE = "IND.HK.NSE", - IND_HK_OSE_JPN = "IND.HK.OSE.JPN", - IND_HK_SGX = "IND.HK.SGX", - IND_HK_SNFE = "IND.HK.SNFE", - IND_HK_TSE_JPN = "IND.HK.TSE.JPN", - IND_HK = "IND.HK", - IND_US = "IND.US", - SLB_AQS = "SLB.AQS", - STK_AMEX = "STK.AMEX", - STK_ARCA = "STK.ARCA", - STK_EU_AEB = "STK.EU.AEB", - STK_EU_BM = "STK.EU.BM", - STK_EU_BVME = "STK.EU.BVME", - STK_EU_EBS = "STK.EU.EBS", - STK_EU_IBIS = "STK.EU.IBIS", - STK_EU_IBIS_ETF = "STK.EU.IBIS-ETF", - STK_EU_IBIS_EUSTARS = "STK.EU.IBIS-EUSTARS", - STK_EU_IBIS_NEWX = "STK.EU.IBIS-NEWX", - STK_EU_IBIS_USSTARS = "STK.EU.IBIS-USSTARS", - STK_EU_IBIS_XETRA = "STK.EU.IBIS-XETRA", - STK_EU_LSE = "STK.EU.LSE", - STK_EU_SBF = "STK.EU.SBF", - STK_EU_SBVM = "STK.EU.SBVM", - STK_EU_SFB = "STK.EU.SFB", - STK_EU_SWISS = "STK.EU.SWISS", - STK_EU_VIRTX = "STK.EU.VIRTX", - STK_EU = "STK.EU", - STK_HK_ASX = "STK.HK.ASX", - STK_HK_NSE = "STK.HK.NSE", - STK_HK_SEHK = "STK.HK.SEHK", - STK_HK_SGX = "STK.HK.SGX", - STK_HK_TSE_JPN = "STK.HK.TSE.JPN", - STK_HK = "STK.HK", - STK_NA_CANADA = "STK.NA.CANADA", - STK_NA_TSE = "STK.NA.TSE", - STK_NA_VENTURE = "STK.NA.VENTURE", - STK_NA = "STK.NA", - STK_NASDAQ_NMS = "STK.NASDAQ.NMS", - STK_NASDAQ_SCM = "STK.NASDAQ.SCM", - STK_NASDAQ = "STK.NASDAQ", - STK_NYSE = "STK.NYSE", - STK_OTCBB = "STK.OTCBB", - STK_PINK = "STK.PINK", - STK_US_MAJOR = "STK.US.MAJOR", - STK_US_MINOR = "STK.US.MINOR", - STK_US = "STK.US", - WAR_EU_ALL = "WAR.EU.ALL", -} - -export enum Instrument { - STK = "STK", - BOND = "BOND", - EFP = "EFP", - FUT_EU = "FUT.EU", - FUT_HK = "FUT.HK", - FUT_NA = "FUT.NA", - FUT_US = "FUT.US", - IND_EU = "IND.EU", - IND_HK = "IND.HK", - IND_US = "IND.US", - PMONITOR = "PMONITOR", - PMONITORM = "PMONITORM", - SLB_US = "SLB.US", - STOCK_EU = "STOCK.EU", - STOCK_HK = "STOCK.HK", - STOCK_NA = "STOCK.NA", - WAR_EU = "WAR.EU", -} - -export enum ScanCode { - TOP_PERC_GAIN, - TOP_PERC_LOSE, - MOST_ACTIVE, - ALL_SYMBOLS_ASC, - ALL_SYMBOLS_DESC, - BOND_CUSIP_AZ, - BOND_CUSIP_ZA, - FAR_MATURITY_DATE, - HALTED, - HIGH_BOND_ASK_CURRENT_YIELD_ALL, - HIGH_BOND_ASK_YIELD_ALL, - HIGH_BOND_DEBT_2_BOOK_RATIO, - HIGH_BOND_DEBT_2_EQUITY_RATIO, - HIGH_BOND_DEBT_2_TAN_BOOK_RATIO, - HIGH_BOND_EQUITY_2_BOOK_RATIO, - HIGH_BOND_EQUITY_2_TAN_BOOK_RATIO, - HIGH_BOND_NET_ASK_CURRENT_YIELD_ALL, - HIGH_BOND_NET_ASK_YIELD_ALL, - HIGH_BOND_NET_SPREAD_ALL, - HIGH_BOND_SPREAD_ALL, - HIGH_COUPON_RATE, - HIGH_DIVIDEND_YIELD, - HIGH_DIVIDEND_YIELD_IB, - HIGHEST_SLB_BID, - HIGH_GROWTH_RATE, - HIGH_MOODY_RATING_ALL, - HIGH_OPEN_GAP, - HIGH_OPT_IMP_VOLAT, - HIGH_OPT_IMP_VOLAT_OVER_HIST, - HIGH_OPT_OPEN_INTEREST_PUT_CALL_RATIO, - HIGH_OPT_VOLUME_PUT_CALL_RATIO, - HIGH_PE_RATIO, - HIGH_PRICE_2_BOOK_RATIO, - HIGH_PRICE_2_TAN_BOOK_RATIO, - HIGH_QUICK_RATIO, - HIGH_RETURN_ON_EQUITY, - HIGH_SYNTH_BID_REV_NAT_YIELD, - HIGH_VS_13W_HL, - HIGH_VS_26W_HL, - HIGH_VS_52W_HL, - HOT_BY_OPT_VOLUME, - HOT_BY_PRICE, - HOT_BY_PRICE_RANGE, - HOT_BY_VOLUME, - LIMIT_UP_DOWN, - LOW_BOND_BID_CURRENT_YIELD_ALL, - LOW_BOND_BID_YIELD_ALL, - LOW_BOND_DEBT_2_BOOK_RATIO, - LOW_BOND_DEBT_2_EQUITY_RATIO, - LOW_BOND_DEBT_2_TAN_BOOK_RATIO, - LOW_BOND_EQUITY_2_BOOK_RATIO, - LOW_BOND_EQUITY_2_TAN_BOOK_RATIO, - LOW_BOND_NET_BID_CURRENT_YIELD_ALL, - LOW_BOND_NET_BID_YIELD_ALL, - LOW_BOND_NET_SPREAD_ALL, - LOW_BOND_SPREAD_ALL, - LOW_COUPON_RATE, - LOWEST_SLB_ASK, - LOW_GROWTH_RATE, - LOW_MOODY_RATING_ALL, - LOW_OPEN_GAP, - LOW_OPT_IMP_VOLAT, - LOW_OPT_IMP_VOLAT_OVER_HIST, - LOW_OPT_OPEN_INTEREST_PUT_CALL_RATIO, - LOW_OPT_VOLUME_PUT_CALL_RATIO, - LOW_PE_RATIO, - LOW_PRICE_2_BOOK_RATIO, - LOW_PRICE_2_TAN_BOOK_RATIO, - LOW_QUICK_RATIO, - LOW_RETURN_ON_EQUITY, - LOW_SYNTH_ASK_REV_NAT_YIELD, - LOW_VS_13W_HL, - LOW_VS_26W_HL, - LOW_VS_52W_HL, - LOW_WAR_REL_IMP_VOLAT, - MARKET_CAP_USD_ASC, - MARKET_CAP_USD_DESC, - MOST_ACTIVE_AVG_USD, - MOST_ACTIVE_USD, - NEAR_MATURITY_DATE, - NOT_OPEN, - OPT_OPEN_INTEREST_MOST_ACTIVE, - OPT_VOLUME_MOST_ACTIVE, - PMONITOR_AVAIL_CONTRACTS, - PMONITOR_CTT, - PMONITOR_IBOND, - PMONITOR_RFQ, - TOP_OPEN_PERC_GAIN, - TOP_OPEN_PERC_LOSE, - TOP_OPT_IMP_VOLAT_GAIN, - TOP_OPT_IMP_VOLAT_LOSE, - TOP_PRICE_RANGE, - TOP_STOCK_BUY_IMBALANCE_ADV_RATIO, - TOP_STOCK_SELL_IMBALANCE_ADV_RATIO, - TOP_TRADE_COUNT, - TOP_TRADE_RATE, - TOP_VOLUME_RATE, - WSH_NEXT_ANALYST_MEETING, - WSH_NEXT_EARNINGS, - WSH_NEXT_EVENT, - WSH_NEXT_MAJOR_EVENT, - WSH_PREV_ANALYST_MEETING, - WSH_PREV_EARNINGS, - WSH_PREV_EVENT, -} +// for backward compatibility. Type moved to `api` +export { + Instrument, + LocationCode, + ScanCode, +} from "../../api/market-scanner/market-scanner"; diff --git a/src/api/api.ts b/src/api/api.ts index fb43ab82..2da0439c 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -928,12 +928,15 @@ export class IBApi extends EventEmitter { * @param reqId The request's unique identifier. * @param contract The contract for which we want to retrieve the data. * @param endDateTime Request's ending time with format yyyyMMdd HH:mm:ss {TMZ} - * @param durationStr The amount of time for which the data needs to be retrieved: - * - " S (seconds) - " D (days) - * - " W (weeks) - " M (months) - * - " Y (years) + * @param durationStr The amount of time for which the data needs to be retrieved (number space unit). + * Note: min duration is "30 S", available units: + * - S (seconds) + * - D (days) + * - W (weeks) + * - M (months) + * - Y (years) * @param barSizeSetting the size of the bar: - * - 1 sec + * - 1 secs * - 5 secs * - 15 secs * - 30 secs diff --git a/src/api/historical/bar-size-setting.ts b/src/api/historical/bar-size-setting.ts index 6570c2d8..a4d90d93 100644 --- a/src/api/historical/bar-size-setting.ts +++ b/src/api/historical/bar-size-setting.ts @@ -22,8 +22,8 @@ export enum BarSizeSetting { HOURS_FOUR = "4 hours", HOURS_EIGHT = "8 hours", DAYS_ONE = "1 day", - WEEKS_ONE = "1W", - MONTHS_ONE = "1M" + WEEKS_ONE = "1 week", // "1W" or "1 week"? + MONTHS_ONE = "1 month", // "1M" or "1 month"? } export default BarSizeSetting; diff --git a/src/api/market-scanner/market-scanner.ts b/src/api/market-scanner/market-scanner.ts new file mode 100644 index 00000000..2b79e308 --- /dev/null +++ b/src/api/market-scanner/market-scanner.ts @@ -0,0 +1,213 @@ +export enum LocationCode { + BOND_US = "BOND.US", + EFP = "EFP", + // FUT_ECBOT = "FUT.ECBOT", + FUT_EU_BELFOX = "FUT.EU.BELFOX", + // FUT_EU_DTB = "FUT.EU.DTB", + FUT_EU_FTA = "FUT.EU.FTA", + FUT_EU_IDEM = "FUT.EU.IDEM", + FUT_EU_LIFFE = "FUT.EU.LIFFE", + FUT_EU_MEFFRV = "FUT.EU.MEFFRV", + FUT_EU_MONEP = "FUT.EU.MONEP", + FUT_EU = "FUT.EU", + // FUT_GLOBEX = "FUT.GLOBEX", + FUT_HK_HKFE = "FUT.HK.HKFE", + FUT_HK_JAPAN = "FUT.HK.JAPAN", + FUT_HK_KSE = "FUT.HK.KSE", + FUT_HK_NSE = "FUT.HK.NSE", + FUT_HK_OSE_JPN = "FUT.HK.OSE.JPN", + FUT_HK_SGX = "FUT.HK.SGX", + FUT_HK_SNFE = "FUT.HK.SNFE", + FUT_HK_TSE_JPN = "FUT.HK.TSE.JPN", + FUT_HK = "FUT.HK", + FUT_IPE = "FUT.IPE", + FUT_NA_CDE = "FUT.NA.CDE", + FUT_NA = "FUT.NA", + FUT_NYBOT = "FUT.NYBOT", + // FUT_NYMEX = "FUT.NYMEX", + FUT_NYSELIFFE = "FUT.NYSELIFFE", + FUT_US = "FUT.US", + IND_EU_BELFOX = "IND.EU.BELFOX", + // IND_EU_DTB = "IND.EU.DTB", + IND_EU_FTA = "IND.EU.FTA", + IND_EU_LIFFE = "IND.EU.LIFFE", + IND_EU_MONEP = "IND.EU.MONEP", + IND_EU = "IND.EU", + IND_HK_HKFE = "IND.HK.HKFE", + IND_HK_JAPAN = "IND.HK.JAPAN", + IND_HK_KSE = "IND.HK.KSE", + IND_HK_NSE = "IND.HK.NSE", + IND_HK_OSE_JPN = "IND.HK.OSE.JPN", + IND_HK_SGX = "IND.HK.SGX", + IND_HK_SNFE = "IND.HK.SNFE", + IND_HK_TSE_JPN = "IND.HK.TSE.JPN", + IND_HK = "IND.HK", + IND_US = "IND.US", + SLB_AQS = "SLB.AQS", + STK_AMEX = "STK.AMEX", + STK_ARCA = "STK.ARCA", + STK_EU_AEB = "STK.EU.AEB", + STK_EU_BM = "STK.EU.BM", + STK_EU_BVME = "STK.EU.BVME", + STK_EU_EBS = "STK.EU.EBS", + STK_EU_IBIS = "STK.EU.IBIS", + STK_EU_IBIS_ETF = "STK.EU.IBIS-ETF", + STK_EU_IBIS_EUSTARS = "STK.EU.IBIS-EUSTARS", + STK_EU_IBIS_NEWX = "STK.EU.IBIS-NEWX", + STK_EU_IBIS_USSTARS = "STK.EU.IBIS-USSTARS", + STK_EU_IBIS_XETRA = "STK.EU.IBIS-XETRA", + STK_EU_LSE = "STK.EU.LSE", + STK_EU_SBF = "STK.EU.SBF", + STK_EU_SBVM = "STK.EU.SBVM", + STK_EU_SFB = "STK.EU.SFB", + STK_EU_SWISS = "STK.EU.SWISS", + STK_EU_VIRTX = "STK.EU.VIRTX", + STK_EU = "STK.EU", + STK_HK_ASX = "STK.HK.ASX", + STK_HK_NSE = "STK.HK.NSE", + STK_HK_SEHK = "STK.HK.SEHK", + STK_HK_SGX = "STK.HK.SGX", + STK_HK_TSE_JPN = "STK.HK.TSE.JPN", + STK_HK = "STK.HK", + STK_NA_CANADA = "STK.NA.CANADA", + STK_NA_TSE = "STK.NA.TSE", + STK_NA_VENTURE = "STK.NA.VENTURE", + STK_NA = "STK.NA", + STK_NASDAQ_NMS = "STK.NASDAQ.NMS", + STK_NASDAQ_SCM = "STK.NASDAQ.SCM", + STK_NASDAQ = "STK.NASDAQ", + STK_NYSE = "STK.NYSE", + STK_OTCBB = "STK.OTCBB", + STK_PINK = "STK.PINK", + STK_US_MAJOR = "STK.US.MAJOR", + STK_US_MINOR = "STK.US.MINOR", + STK_US = "STK.US", + WAR_EU_ALL = "WAR.EU.ALL", +} + +export enum Instrument { + STK = "STK", + BOND = "BOND", + EFP = "EFP", + FUT_EU = "FUT.EU", + FUT_HK = "FUT.HK", + FUT_NA = "FUT.NA", + FUT_US = "FUT.US", + IND_EU = "IND.EU", + IND_HK = "IND.HK", + IND_US = "IND.US", + PMONITOR = "PMONITOR", + PMONITORM = "PMONITORM", + SLB_US = "SLB.US", + STOCK_EU = "STOCK.EU", + STOCK_HK = "STOCK.HK", + STOCK_NA = "STOCK.NA", + WAR_EU = "WAR.EU", +} + +export enum ScanCode { + TOP_PERC_GAIN, + TOP_PERC_LOSE, + MOST_ACTIVE, + ALL_SYMBOLS_ASC, + ALL_SYMBOLS_DESC, + BOND_CUSIP_AZ, + BOND_CUSIP_ZA, + FAR_MATURITY_DATE, + HALTED, + HIGH_BOND_ASK_CURRENT_YIELD_ALL, + HIGH_BOND_ASK_YIELD_ALL, + HIGH_BOND_DEBT_2_BOOK_RATIO, + HIGH_BOND_DEBT_2_EQUITY_RATIO, + HIGH_BOND_DEBT_2_TAN_BOOK_RATIO, + HIGH_BOND_EQUITY_2_BOOK_RATIO, + HIGH_BOND_EQUITY_2_TAN_BOOK_RATIO, + HIGH_BOND_NET_ASK_CURRENT_YIELD_ALL, + HIGH_BOND_NET_ASK_YIELD_ALL, + HIGH_BOND_NET_SPREAD_ALL, + HIGH_BOND_SPREAD_ALL, + HIGH_COUPON_RATE, + HIGH_DIVIDEND_YIELD, + HIGH_DIVIDEND_YIELD_IB, + HIGHEST_SLB_BID, + HIGH_GROWTH_RATE, + HIGH_MOODY_RATING_ALL, + HIGH_OPEN_GAP, + HIGH_OPT_IMP_VOLAT, + HIGH_OPT_IMP_VOLAT_OVER_HIST, + HIGH_OPT_OPEN_INTEREST_PUT_CALL_RATIO, + HIGH_OPT_VOLUME_PUT_CALL_RATIO, + HIGH_PE_RATIO, + HIGH_PRICE_2_BOOK_RATIO, + HIGH_PRICE_2_TAN_BOOK_RATIO, + HIGH_QUICK_RATIO, + HIGH_RETURN_ON_EQUITY, + HIGH_SYNTH_BID_REV_NAT_YIELD, + HIGH_VS_13W_HL, + HIGH_VS_26W_HL, + HIGH_VS_52W_HL, + HOT_BY_OPT_VOLUME, + HOT_BY_PRICE, + HOT_BY_PRICE_RANGE, + HOT_BY_VOLUME, + LIMIT_UP_DOWN, + LOW_BOND_BID_CURRENT_YIELD_ALL, + LOW_BOND_BID_YIELD_ALL, + LOW_BOND_DEBT_2_BOOK_RATIO, + LOW_BOND_DEBT_2_EQUITY_RATIO, + LOW_BOND_DEBT_2_TAN_BOOK_RATIO, + LOW_BOND_EQUITY_2_BOOK_RATIO, + LOW_BOND_EQUITY_2_TAN_BOOK_RATIO, + LOW_BOND_NET_BID_CURRENT_YIELD_ALL, + LOW_BOND_NET_BID_YIELD_ALL, + LOW_BOND_NET_SPREAD_ALL, + LOW_BOND_SPREAD_ALL, + LOW_COUPON_RATE, + LOWEST_SLB_ASK, + LOW_GROWTH_RATE, + LOW_MOODY_RATING_ALL, + LOW_OPEN_GAP, + LOW_OPT_IMP_VOLAT, + LOW_OPT_IMP_VOLAT_OVER_HIST, + LOW_OPT_OPEN_INTEREST_PUT_CALL_RATIO, + LOW_OPT_VOLUME_PUT_CALL_RATIO, + LOW_PE_RATIO, + LOW_PRICE_2_BOOK_RATIO, + LOW_PRICE_2_TAN_BOOK_RATIO, + LOW_QUICK_RATIO, + LOW_RETURN_ON_EQUITY, + LOW_SYNTH_ASK_REV_NAT_YIELD, + LOW_VS_13W_HL, + LOW_VS_26W_HL, + LOW_VS_52W_HL, + LOW_WAR_REL_IMP_VOLAT, + MARKET_CAP_USD_ASC, + MARKET_CAP_USD_DESC, + MOST_ACTIVE_AVG_USD, + MOST_ACTIVE_USD, + NEAR_MATURITY_DATE, + NOT_OPEN, + OPT_OPEN_INTEREST_MOST_ACTIVE, + OPT_VOLUME_MOST_ACTIVE, + PMONITOR_AVAIL_CONTRACTS, + PMONITOR_CTT, + PMONITOR_IBOND, + PMONITOR_RFQ, + TOP_OPEN_PERC_GAIN, + TOP_OPEN_PERC_LOSE, + TOP_OPT_IMP_VOLAT_GAIN, + TOP_OPT_IMP_VOLAT_LOSE, + TOP_PRICE_RANGE, + TOP_STOCK_BUY_IMBALANCE_ADV_RATIO, + TOP_STOCK_SELL_IMBALANCE_ADV_RATIO, + TOP_TRADE_COUNT, + TOP_TRADE_RATE, + TOP_VOLUME_RATE, + WSH_NEXT_ANALYST_MEETING, + WSH_NEXT_EARNINGS, + WSH_NEXT_EVENT, + WSH_NEXT_MAJOR_EVENT, + WSH_PREV_ANALYST_MEETING, + WSH_PREV_EARNINGS, + WSH_PREV_EVENT, +} diff --git a/src/index.ts b/src/index.ts index d5351f0a..b99850a7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -49,6 +49,7 @@ export { Future } from "./api/contract/future"; export { Index } from "./api/contract/ind"; export { Option } from "./api/contract/option"; export { Stock } from "./api/contract/stock"; +export { WshEventData } from "./api/contract/wsh"; // export container types @@ -125,6 +126,14 @@ export { TrailingStopOrder } from "./api/order/trailingStop"; export { CommissionReport } from "./api/report/commissionReport"; export { ExecutionFilter } from "./api/report/executionFilter"; +// export market scanner types + +export { + Instrument, + LocationCode, + ScanCode, +} from "./api/market-scanner/market-scanner"; + // export IBApi as default export default IBApi; diff --git a/src/tests/unit/api/contract-details.test.ts b/src/tests/unit/api/contract-details.test.ts index 8882d52e..e1360427 100644 --- a/src/tests/unit/api/contract-details.test.ts +++ b/src/tests/unit/api/contract-details.test.ts @@ -1,11 +1,13 @@ -import { IBApi } from "../../../api/api"; -import ContractDetails from "../../../api/contract/contractDetails"; -import Forex from "../../../api/contract/forex"; -import Option from "../../../api/contract/option"; -import Stock from "../../../api/contract/stock"; -import { EventName } from "../../../api/data/enum/event-name"; -import OptionType from "../../../api/data/enum/option-type"; -import SecType from "../../../api/data/enum/sec-type"; +import { + ContractDetails, + EventName, + Forex, + IBApi, + Option, + OptionType, + SecType, + Stock, +} from "../../.."; import configuration from "../../../common/configuration"; describe("IBApi reqContractDetails Tests", () => { diff --git a/src/tests/unit/api/historical-data.test.ts b/src/tests/unit/api/historical-data.test.ts new file mode 100644 index 00000000..0ec1f3d2 --- /dev/null +++ b/src/tests/unit/api/historical-data.test.ts @@ -0,0 +1,318 @@ +/** + * This file implement test code for the public API interfaces. + */ +import { + BarSizeSetting, + Contract, + EventName, + IBApi, + Option, + OptionType, + SecType, + WhatToShow, +} from "../../.."; +import configuration from "../../../common/configuration"; + +describe("IBApi Historical data Tests", () => { + jest.setTimeout(20000); + + let ib: IBApi; + const clientId = Math.floor(Math.random() * 32766) + 1; // ensure unique client + + beforeEach(() => { + ib = new IBApi({ + host: configuration.ib_host, + port: configuration.ib_port, + clientId, + }); + // logger.info("IBApi created"); + }); + + afterEach(() => { + if (ib) { + ib.disconnect(); + ib = undefined; + } + // logger.info("IBApi disconnected"); + }); + + it("Stock market data", (done) => { + const refId = 46; + let counter = 0; + + ib.once(EventName.connected, () => { + const contract: Contract = { + symbol: "SPY", + currency: "USD", + secType: SecType.STK, + exchange: "SMART", + }; + ib.reqHistoricalData( + refId, + contract, + "20231006-20:00:00", + "30 S", + BarSizeSetting.SECONDS_ONE, + WhatToShow.TRADES, + 0, + 2, + false, + ); + }) + .on( + EventName.historicalData, + ( + reqId: number, + time: string, + open: number, + high: number, + low: number, + close: number, + volume: number, + count: number | undefined, + WAP: number, + ) => { + // console.log( + // counter, + // time, + // open, + // high, + // low, + // close, + // volume, + // count, + // WAP, + // ); + expect(reqId).toEqual(refId); + if (time.startsWith("finished")) { + expect(counter).toEqual(30); + done(); + } else if (counter++ == 29) { + expect(time).toEqual("1696622399"); + expect(open).toEqual(429.5); + expect(high).toEqual(429.6); + expect(low).toEqual(429.47); + expect(close).toEqual(429.52); + expect(volume).toEqual(345338); + expect(count).toEqual(1076); + expect(WAP).toEqual(429.532); + } + }, + ) + .on(EventName.error, (err, code, reqId) => { + if (reqId == refId) done(`[${reqId}] ${err.message} (#${code})`); + }); + + ib.connect(); + }); + + test("Option market data", (done) => { + const refId = 47; + let counter = 0; + + ib.once(EventName.connected, () => { + const contract: Option = new Option( + "AAPL", + "20251219", + 200, + OptionType.Put, + ); + ib.reqHistoricalData( + refId, + contract, + "20231006-20:00:00", + "30 S", + BarSizeSetting.SECONDS_FIFTEEN, + WhatToShow.BID_ASK, + 0, + 2, + false, + ); + }) + .on( + EventName.historicalData, + ( + reqId: number, + time: string, + open: number, + high: number, + low: number, + close: number, + volume: number, + count: number | undefined, + WAP: number, + ) => { + // console.log( + // counter, + // time, + // open, + // high, + // low, + // close, + // volume, + // count, + // WAP, + // ); + expect(reqId).toEqual(refId); + if (time.startsWith("finished")) { + expect(counter).toEqual(2); + done(); + } else if (counter++ == 1) { + expect(time).toEqual("1696622385"); + expect(open).toEqual(31.85); + expect(high).toEqual(31.85); + expect(low).toEqual(31.85); + expect(close).toEqual(31.85); + expect(volume).toEqual(-1); + expect(count).toEqual(-1); + expect(WAP).toEqual(-1); + } + }, + ) + .on(EventName.error, (err, code, reqId) => { + if (reqId == refId) done(`[${reqId}] ${err.message} (#${code})`); + }); + + ib.connect(); + }); + + it("Weekly market data", (done) => { + const refId = 48; + let counter = 0; + + ib.once(EventName.connected, () => { + const contract: Contract = { + symbol: "SPY", + currency: "USD", + secType: SecType.STK, + exchange: "SMART", + }; + ib.reqHistoricalData( + refId, + contract, + "20230904-20:00:00", + "1 M", + BarSizeSetting.WEEKS_ONE, + WhatToShow.TRADES, + 0, + 2, + false, + ); + }) + .on( + EventName.historicalData, + ( + reqId: number, + time: string, + open: number, + high: number, + low: number, + close: number, + volume: number, + count: number | undefined, + WAP: number, + ) => { + // console.log( + // counter, + // time, + // open, + // high, + // low, + // close, + // volume, + // count, + // WAP, + // ); + expect(reqId).toEqual(refId); + if (time.startsWith("finished")) { + expect(counter).toEqual(5); + done(); + } else if (counter++ == 4) { + expect(time).toEqual("20230901"); + expect(open).toEqual(437.3); + expect(high).toEqual(453.67); + expect(low).toEqual(437.3); + expect(close).toEqual(450.92); + expect(volume).toEqual(277178324); + expect(count).toEqual(1393264); + expect(WAP).toEqual(448.476); + } + }, + ) + .on(EventName.error, (err, code, reqId) => { + if (reqId == refId) done(`[${reqId}] ${err.message} (#${code})`); + }); + + ib.connect(); + }); + + it("Monthly market data", (done) => { + const refId = 49; + let counter = 0; + + ib.once(EventName.connected, () => { + const contract: Contract = { + symbol: "SPY", + currency: "USD", + secType: SecType.STK, + exchange: "SMART", + }; + ib.reqHistoricalData( + refId, + contract, + "20230904-20:00:00", + "1 Y", + BarSizeSetting.MONTHS_ONE, + WhatToShow.TRADES, + 0, + 2, + false, + ); + }) + .on( + EventName.historicalData, + ( + reqId: number, + time: string, + open: number, + high: number, + low: number, + close: number, + volume: number, + count: number | undefined, + WAP: number, + ) => { + // console.log( + // counter, + // time, + // open, + // high, + // low, + // close, + // volume, + // count, + // WAP, + // ); + expect(reqId).toEqual(refId); + if (time.startsWith("finished")) { + expect(counter).toEqual(13); + done(); + } else if (counter++ == 12) { + expect(time).toEqual("20230901"); + expect(open).toEqual(451.53); + expect(high).toEqual(453.67); + expect(low).toEqual(449.68); + expect(close).toEqual(450.92); + expect(volume).toEqual(47405890); + expect(count).toEqual(248346); + expect(WAP).toEqual(451.3); + } + }, + ) + .on(EventName.error, (err, code, reqId) => { + if (reqId == refId) done(`[${reqId}] ${err.message} (#${code})`); + }); + + ib.connect(); + }); +}); diff --git a/src/tests/unit/api/market-scanner.test.ts b/src/tests/unit/api/market-scanner.test.ts index bccf466b..3cc05ca7 100644 --- a/src/tests/unit/api/market-scanner.test.ts +++ b/src/tests/unit/api/market-scanner.test.ts @@ -1,11 +1,11 @@ import { + ContractDetails, + EventName, + IBApi, Instrument, LocationCode, ScanCode, -} from "../../../api-next/market-scanner/market-scanner"; -import { IBApi } from "../../../api/api"; -import ContractDetails from "../../../api/contract/contractDetails"; -import { EventName } from "../../../api/data/enum/event-name"; +} from "../../.."; import configuration from "../../../common/configuration"; describe("IBApi market scanner tests", () => { diff --git a/src/tests/unit/api/matching-symbols.test.ts b/src/tests/unit/api/matching-symbols.test.ts index dd66ef24..00cbe39e 100644 --- a/src/tests/unit/api/matching-symbols.test.ts +++ b/src/tests/unit/api/matching-symbols.test.ts @@ -1,6 +1,4 @@ -import { IBApi } from "../../../api/api"; -import ContractDescription from "../../../api/contract/contractDescription"; -import { EventName } from "../../../api/data/enum/event-name"; +import { ContractDescription, EventName, IBApi } from "../../.."; import configuration from "../../../common/configuration"; describe("IBApi reqMatchingSymbols Tests", () => { diff --git a/src/tests/unit/api/order/placeOrder.test.ts b/src/tests/unit/api/order/placeOrder.test.ts index 49aae6c5..12d25e04 100644 --- a/src/tests/unit/api/order/placeOrder.test.ts +++ b/src/tests/unit/api/order/placeOrder.test.ts @@ -70,9 +70,9 @@ describe("Place Orders", () => { expect(orderId).toEqual(refId); expect(contract.symbol).toEqual("AAPL"); expect(order.totalQuantity).toEqual(2); - if (orderId === refId) { - done(); - } + }) + .on(EventName.openOrderEnd, () => { + done(); }) .on( EventName.error, @@ -139,9 +139,9 @@ describe("Place Orders", () => { }) .on(EventName.openOrder, (orderId, _contract, _order, _orderState) => { expect(orderId).toEqual(refId); - if (orderId === refId) { - done(); - } + }) + .on(EventName.openOrderEnd, () => { + done(); }) .on( EventName.error, diff --git a/src/tests/unit/api/wsh-event-data.test.ts b/src/tests/unit/api/wsh-event-data.test.ts index 333cc2d9..d3d473c9 100644 --- a/src/tests/unit/api/wsh-event-data.test.ts +++ b/src/tests/unit/api/wsh-event-data.test.ts @@ -1,8 +1,5 @@ -import { IBApi } from "../../../api/api"; -import WshEventData from "../../../api/contract/wsh"; -import { EventName } from "../../../api/data/enum/event-name"; +import { ErrorCode, EventName, IBApi, WshEventData } from "../../.."; import configuration from "../../../common/configuration"; -import { ErrorCode } from "../../../common/errorCode"; import logger from "../../../common/logger"; describe("IBApi Fundamental Data", () => { diff --git a/yarn.lock b/yarn.lock index 176c68a6..a8b724a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -415,10 +415,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.49.0": - version "8.49.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.49.0.tgz#86f79756004a97fa4df866835093f1df3d03c333" - integrity sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w== +"@eslint/js@8.51.0": + version "8.51.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.51.0.tgz#6d419c240cfb2b66da37df230f7e7eef801c32fa" + integrity sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg== "@humanwhocodes/config-array@^0.11.11": version "0.11.11" @@ -790,10 +790,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.5.4": - version "29.5.4" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.4.tgz#9d0a16edaa009a71e6a71a999acd582514dab566" - integrity sha512-PhglGmhWeD46FYOVLt3X7TiWjzwuVGW9wG/4qocPevXMjCmrIc5b6db9WjeGE4QYVpUAWMDv3v0IiBwObY289A== +"@types/jest@^29.5.5": + version "29.5.5" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.5.tgz#727204e06228fe24373df9bae76b90f3e8236a2a" + integrity sha512-ebylz2hnsWR9mYvmBFbXJXr+33UPc4+ZdxyDXh5w0FlPBTfCVN3wPL+kuOiQt3xvrK419v7XWeAs+AeOksafXg== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -818,10 +818,10 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.1.tgz#0480eeb7221eb9bc398ad7432c9d7e14b1a5a367" integrity sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg== -"@types/source-map-support@^0.5.7": - version "0.5.7" - resolved "https://registry.yarnpkg.com/@types/source-map-support/-/source-map-support-0.5.7.tgz#68b3cc568cc4cc4d141d58edfca164c1354044b9" - integrity sha512-rJqBfLel8jPuL5MwXxMH2Cdb6D80Snu3YJxDE+VJAmtT04l7j3OA7h+FYXlYDys0WeBVH/MPbExj3B8NCaDw9g== +"@types/source-map-support@^0.5.8": + version "0.5.8" + resolved "https://registry.yarnpkg.com/@types/source-map-support/-/source-map-support-0.5.8.tgz#ec9bd9d4c6ef9183f516109f26225350b73f91be" + integrity sha512-u5nwLcaENciDwebPwwZb2AM1LvdlgFQfqCKxWQxcgNsQhUQciGuUnJ2LjGFAkInY2APXQzIypiUSa9zB6Epddg== dependencies: source-map "^0.6.0" @@ -842,16 +842,16 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.0.tgz#ed2a38867190f8a688af85ad7c8a74670b8b3675" - integrity sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag== +"@typescript-eslint/eslint-plugin@^6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.4.tgz#057338df21b6062c2f2fc5999fbea8af9973ac6d" + integrity sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.7.0" - "@typescript-eslint/type-utils" "6.7.0" - "@typescript-eslint/utils" "6.7.0" - "@typescript-eslint/visitor-keys" "6.7.0" + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/type-utils" "6.7.4" + "@typescript-eslint/utils" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -866,15 +866,15 @@ dependencies: "@typescript-eslint/utils" "5.62.0" -"@typescript-eslint/parser@^6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.0.tgz#332fe9c7ecf6783d3250b4c8a960bd4af0995807" - integrity sha512-jZKYwqNpNm5kzPVP5z1JXAuxjtl2uG+5NpaMocFPTNC2EdYIgbXIPImObOkhbONxtFTTdoZstLZefbaK+wXZng== +"@typescript-eslint/parser@^6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.4.tgz#23d1dd4fe5d295c7fa2ab651f5406cd9ad0bd435" + integrity sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA== dependencies: - "@typescript-eslint/scope-manager" "6.7.0" - "@typescript-eslint/types" "6.7.0" - "@typescript-eslint/typescript-estree" "6.7.0" - "@typescript-eslint/visitor-keys" "6.7.0" + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/typescript-estree" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" debug "^4.3.4" "@typescript-eslint/scope-manager@5.62.0": @@ -885,21 +885,21 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/scope-manager@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.0.tgz#6b3c22187976e2bf5ed0dc0d9095f1f2cbd1d106" - integrity sha512-lAT1Uau20lQyjoLUQ5FUMSX/dS07qux9rYd5FGzKz/Kf8W8ccuvMyldb8hadHdK/qOI7aikvQWqulnEq2nCEYA== +"@typescript-eslint/scope-manager@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.4.tgz#a484a17aa219e96044db40813429eb7214d7b386" + integrity sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A== dependencies: - "@typescript-eslint/types" "6.7.0" - "@typescript-eslint/visitor-keys" "6.7.0" + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" -"@typescript-eslint/type-utils@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.0.tgz#21a013d4c7f96255f5e64ac59fb41301d1e052ba" - integrity sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg== +"@typescript-eslint/type-utils@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.4.tgz#847cd3b59baf948984499be3e0a12ff07373e321" + integrity sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ== dependencies: - "@typescript-eslint/typescript-estree" "6.7.0" - "@typescript-eslint/utils" "6.7.0" + "@typescript-eslint/typescript-estree" "6.7.4" + "@typescript-eslint/utils" "6.7.4" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -908,10 +908,10 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/types@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.0.tgz#8de8ba9cafadc38e89003fe303e219c9250089ae" - integrity sha512-ihPfvOp7pOcN/ysoj0RpBPOx3HQTJTrIN8UZK+WFd3/iDeFHHqeyYxa4hQk4rMhsz9H9mXpR61IzwlBVGXtl9Q== +"@typescript-eslint/types@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.4.tgz#5d358484d2be986980c039de68e9f1eb62ea7897" + integrity sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA== "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" @@ -926,13 +926,13 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.0.tgz#20ce2801733bd46f02cc0f141f5b63fbbf2afb63" - integrity sha512-dPvkXj3n6e9yd/0LfojNU8VMUGHWiLuBZvbM6V6QYD+2qxqInE7J+J/ieY2iGwR9ivf/R/haWGkIj04WVUeiSQ== +"@typescript-eslint/typescript-estree@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.4.tgz#f2baece09f7bb1df9296e32638b2e1130014ef1a" + integrity sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ== dependencies: - "@typescript-eslint/types" "6.7.0" - "@typescript-eslint/visitor-keys" "6.7.0" + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/visitor-keys" "6.7.4" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" @@ -953,17 +953,17 @@ eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/utils@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.0.tgz#61b6f1f1b82ad529abfcee074d21764e880886fb" - integrity sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA== +"@typescript-eslint/utils@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.4.tgz#2236f72b10e38277ee05ef06142522e1de470ff2" + integrity sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.7.0" - "@typescript-eslint/types" "6.7.0" - "@typescript-eslint/typescript-estree" "6.7.0" + "@typescript-eslint/scope-manager" "6.7.4" + "@typescript-eslint/types" "6.7.4" + "@typescript-eslint/typescript-estree" "6.7.4" semver "^7.5.4" "@typescript-eslint/visitor-keys@5.62.0": @@ -974,12 +974,12 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" -"@typescript-eslint/visitor-keys@6.7.0": - version "6.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.0.tgz#34140ac76dfb6316d17012e4469acf3366ad3f44" - integrity sha512-/C1RVgKFDmGMcVGeD8HjKv2bd72oI1KxQDeY8uc66gw9R0OK0eMq48cA+jv9/2Ag6cdrsUGySm1yzYmfz0hxwQ== +"@typescript-eslint/visitor-keys@6.7.4": + version "6.7.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.4.tgz#80dfecf820fc67574012375859085f91a4dff043" + integrity sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA== dependencies: - "@typescript-eslint/types" "6.7.0" + "@typescript-eslint/types" "6.7.4" eslint-visitor-keys "^3.4.1" acorn-jsx@^5.3.2: @@ -1471,10 +1471,10 @@ eslint-etc@^5.1.0: tsutils "^3.17.1" tsutils-etc "^1.4.1" -eslint-plugin-jest@^27.2.3: - version "27.2.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz#6f8a4bb2ca82c0c5d481d1b3be256ab001f5a3ec" - integrity sha512-sRLlSCpICzWuje66Gl9zvdF6mwD5X86I4u55hJyFBsxYOsBCmT5+kSUjf+fkFWVMMgpzNEupjW8WzUqi83hJAQ== +eslint-plugin-jest@^27.4.2: + version "27.4.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.4.2.tgz#181d999ac67a9b6040db1d27935887cf5a2882ed" + integrity sha512-3Nfvv3wbq2+PZlRTf2oaAWXWwbdBejFRBR2O8tAO67o+P8zno+QGbcDYaAXODlreXVg+9gvWhKKmG2rgfb8GEg== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -1514,15 +1514,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.49.0: - version "8.49.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.49.0.tgz#09d80a89bdb4edee2efcf6964623af1054bf6d42" - integrity sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ== +eslint@^8.51.0: + version "8.51.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.51.0.tgz#4a82dae60d209ac89a5cff1604fea978ba4950f3" + integrity sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.6.1" "@eslint/eslintrc" "^2.1.2" - "@eslint/js" "8.49.0" + "@eslint/js" "8.51.0" "@humanwhocodes/config-array" "^0.11.11" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8"