Skip to content

Commit df87e64

Browse files
alexpipipiclaude
andcommitted
fix: remove tradinghours marketplace module
- Delete src/marketplace/tradinghours.ts (TradingHoursApi class) - Remove tradinghours from client marketplace namespace - Remove 7 TradingHours* types from types.ts - Remove tradinghours tests from marketplace.test.ts and smoke.ts - Remove tradinghours assertion from client.test.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f75369c commit df87e64

6 files changed

Lines changed: 1 addition & 129 deletions

File tree

src/client.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import { HttpClient } from "./http.js";
1515
import { type Logger, resolveLogger } from "./logger.js";
1616
import { InvestVerteApi } from "./marketplace/investverte.js";
1717
import { PraamsApi } from "./marketplace/praams.js";
18-
import { TradingHoursApi } from "./marketplace/tradinghours.js";
19-
2018
// Marketplace modules
2119
import { UnicornBayApi } from "./marketplace/unicornbay.js";
2220
import { DEFAULT_RETRY } from "./retry.js";
@@ -173,17 +171,15 @@ export class EODHDClient {
173171
readonly commodities: CommoditiesApi;
174172

175173
/**
176-
* Marketplace data providers (Unicorn Bay, Trading Hours, Praams, InvestVerte).
174+
* Marketplace data providers (Unicorn Bay, Praams, InvestVerte).
177175
*
178176
* @example
179177
* ```ts
180-
* const markets = await client.marketplace.tradinghours.markets();
181178
* const analysis = await client.marketplace.praams.analyseEquityByTicker('AAPL.US');
182179
* ```
183180
*/
184181
readonly marketplace: {
185182
readonly unicornbay: UnicornBayApi;
186-
readonly tradinghours: TradingHoursApi;
187183
readonly praams: PraamsApi;
188184
readonly investverte: InvestVerteApi;
189185
};
@@ -244,7 +240,6 @@ export class EODHDClient {
244240
// Marketplace
245241
this.marketplace = {
246242
unicornbay: new UnicornBayApi(this.http),
247-
tradinghours: new TradingHoursApi(this.http),
248243
praams: new PraamsApi(this.http),
249244
investverte: new InvestVerteApi(this.http),
250245
};

src/marketplace/tradinghours.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/types.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -805,52 +805,6 @@ export interface MarketplaceTickDataPoint {
805805
[key: string]: unknown;
806806
}
807807

808-
// ── Marketplace: Trading Hours ──
809-
810-
export type TradingHoursMarketsParams = {};
811-
812-
export interface TradingHoursDetailsParams {
813-
market?: string;
814-
}
815-
816-
export interface TradingHoursLookupParams {
817-
"filter[symbol]"?: string;
818-
"filter[exchange]"?: string;
819-
}
820-
821-
export interface TradingHoursStatusParams {
822-
market?: string;
823-
}
824-
825-
export interface TradingHoursMarket {
826-
code: string;
827-
name: string;
828-
country: string;
829-
[key: string]: unknown;
830-
}
831-
832-
export interface TradingHoursDetail {
833-
code: string;
834-
name: string;
835-
country: string;
836-
timezone: string;
837-
isOpen: boolean;
838-
[key: string]: unknown;
839-
}
840-
841-
export interface TradingHoursLookupResult {
842-
code: string;
843-
market: string;
844-
[key: string]: unknown;
845-
}
846-
847-
export interface TradingHoursStatus {
848-
code: string;
849-
name: string;
850-
isOpen: boolean;
851-
[key: string]: unknown;
852-
}
853-
854808
// ── Marketplace: Praams ──
855809

856810
export interface PraamsExploreParams {

test/client.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ describe("EODHDClient", () => {
182182
const client = createClient();
183183
expect(client.marketplace).toBeDefined();
184184
expect(client.marketplace.unicornbay).toBeDefined();
185-
expect(client.marketplace.tradinghours).toBeDefined();
186185
expect(client.marketplace.praams).toBeDefined();
187186
expect(client.marketplace.investverte).toBeDefined();
188187
});

test/marketplace.test.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -79,41 +79,6 @@ describe("Marketplace: Unicorn Bay", () => {
7979
});
8080
});
8181

82-
describe("Marketplace: Trading Hours", () => {
83-
let fetch: ReturnType<typeof vi.fn>;
84-
85-
beforeEach(() => {
86-
fetch = mockFetchOk();
87-
vi.stubGlobal("fetch", fetch);
88-
});
89-
90-
afterEach(() => vi.restoreAllMocks());
91-
92-
it("markets() calls /mp/tradinghours/markets", async () => {
93-
const client = createClient();
94-
await client.marketplace.tradinghours.markets();
95-
expect(getCalledUrl(fetch)).toContain("/mp/tradinghours/markets");
96-
});
97-
98-
it("details() calls /mp/tradinghours/markets/details", async () => {
99-
const client = createClient();
100-
await client.marketplace.tradinghours.details({ "filter[market]": "US" });
101-
expect(getCalledUrl(fetch)).toContain("/mp/tradinghours/markets/details");
102-
});
103-
104-
it("lookup() calls /mp/tradinghours/markets/lookup", async () => {
105-
const client = createClient();
106-
await client.marketplace.tradinghours.lookup({ "filter[symbol]": "AAPL" });
107-
expect(getCalledUrl(fetch)).toContain("/mp/tradinghours/markets/lookup");
108-
});
109-
110-
it("status() calls /mp/tradinghours/markets/status", async () => {
111-
const client = createClient();
112-
await client.marketplace.tradinghours.status();
113-
expect(getCalledUrl(fetch)).toContain("/mp/tradinghours/markets/status");
114-
});
115-
});
116-
11782
describe("Marketplace: Praams", () => {
11883
let fetch: ReturnType<typeof vi.fn>;
11984

test/smoke.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ async function main() {
123123
client.marketplace.unicornbay.tickdata("AAPL", { from: "1740000000", to: "1740001000" }));
124124
await test("unicornbay.logo", () => client.marketplace.unicornbay.logo("AAPL"));
125125

126-
// ── Marketplace: Trading Hours ──
127-
console.log("\nMarketplace — Trading Hours:");
128-
await test("tradinghours.markets", () => client.marketplace.tradinghours.markets());
129-
await test("tradinghours.details", () => client.marketplace.tradinghours.details({ market: "US.NASDAQ" }));
130-
await test("tradinghours.lookup", () => client.marketplace.tradinghours.lookup({ "filter[name]": "NASDAQ" }));
131-
await test("tradinghours.status", () => client.marketplace.tradinghours.status({ market: "US.NASDAQ" }));
132-
133126
// ── Marketplace: PRAAMS ──
134127
console.log("\nMarketplace — PRAAMS:");
135128
await test("praams.analyseEquityByTicker", () => client.marketplace.praams.analyseEquityByTicker("AAPL.DE"));

0 commit comments

Comments
 (0)