UNPKG

@sudowealth/schwab-api

Version:

TypeScript client for Charles Schwab API with OAuth support, market data, trading functionality, and complete type safety

211 lines (210 loc) 10 kB
import { z } from 'zod'; export declare const MarketHoursMarketQueryEnum: z.ZodEnum<["equity", "option", "bond", "future", "forex"]>; export type MarketHoursMarketQueryEnum = z.infer<typeof MarketHoursMarketQueryEnum>; declare const SessionIntervalSchema: z.ZodObject<{ start: z.ZodString; end: z.ZodString; }, "strip", z.ZodTypeAny, { start: string; end: string; }, { start: string; end: string; }>; export type SessionIntervalSchema = z.infer<typeof SessionIntervalSchema>; declare const MarketSessionHoursSchema: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{ start: z.ZodString; end: z.ZodString; }, "strip", z.ZodTypeAny, { start: string; end: string; }, { start: string; end: string; }>, "many">>; export type MarketSessionHoursSchema = z.infer<typeof MarketSessionHoursSchema>; export declare const MarketHoursDataSchema: z.ZodObject<{ date: z.ZodOptional<z.ZodEffects<z.ZodString, string | number | Date | null, string>>; marketType: z.ZodEnum<["BOND", "EQUITY", "ETF", "EXTENDED", "FOREX", "FUTURE", "FUTURE_OPTION", "FUNDAMENTAL", "INDEX", "INDICATOR", "MUTUAL_FUND", "OPTION", "UNKNOWN"]>; exchange: z.ZodOptional<z.ZodString>; category: z.ZodOptional<z.ZodString>; product: z.ZodOptional<z.ZodString>; productName: z.ZodOptional<z.ZodString>; isOpen: z.ZodBoolean; sessionHours: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{ start: z.ZodString; end: z.ZodString; }, "strip", z.ZodTypeAny, { start: string; end: string; }, { start: string; end: string; }>, "many">>>; }, "strip", z.ZodTypeAny, { marketType: "UNKNOWN" | "BOND" | "EQUITY" | "ETF" | "EXTENDED" | "FOREX" | "FUTURE" | "FUTURE_OPTION" | "FUNDAMENTAL" | "INDEX" | "INDICATOR" | "MUTUAL_FUND" | "OPTION"; isOpen: boolean; date?: string | number | Date | null | undefined; exchange?: string | undefined; category?: string | undefined; product?: string | undefined; productName?: string | undefined; sessionHours?: Record<string, { start: string; end: string; }[]> | undefined; }, { marketType: "UNKNOWN" | "BOND" | "EQUITY" | "ETF" | "EXTENDED" | "FOREX" | "FUTURE" | "FUTURE_OPTION" | "FUNDAMENTAL" | "INDEX" | "INDICATOR" | "MUTUAL_FUND" | "OPTION"; isOpen: boolean; date?: string | undefined; exchange?: string | undefined; category?: string | undefined; product?: string | undefined; productName?: string | undefined; sessionHours?: Record<string, { start: string; end: string; }[]> | undefined; }>; export type MarketHoursDataSchema = z.infer<typeof MarketHoursDataSchema>; export declare const GetMarketHoursPathParams: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>; export type GetMarketHoursPathParams = z.infer<typeof GetMarketHoursPathParams>; export declare const GetMarketHoursQueryParams: z.ZodObject<{ markets: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["equity", "option", "bond", "future", "forex"]>, z.ZodArray<z.ZodEnum<["equity", "option", "bond", "future", "forex"]>, "many">]>, ("equity" | "option" | "bond" | "future" | "forex")[], "equity" | "option" | "bond" | "future" | "forex" | ("equity" | "option" | "bond" | "future" | "forex")[]>; date: z.ZodOptional<z.ZodEffects<z.ZodString, string | number | Date | null, string>>; }, "strip", z.ZodTypeAny, { markets: ("equity" | "option" | "bond" | "future" | "forex")[]; date?: string | number | Date | null | undefined; }, { markets: "equity" | "option" | "bond" | "future" | "forex" | ("equity" | "option" | "bond" | "future" | "forex")[]; date?: string | undefined; }>; export type GetMarketHoursQueryParams = z.infer<typeof GetMarketHoursQueryParams>; export declare const GetMarketHoursParams: z.ZodObject<{ markets: z.ZodEffects<z.ZodUnion<[z.ZodEnum<["equity", "option", "bond", "future", "forex"]>, z.ZodArray<z.ZodEnum<["equity", "option", "bond", "future", "forex"]>, "many">]>, ("equity" | "option" | "bond" | "future" | "forex")[], "equity" | "option" | "bond" | "future" | "forex" | ("equity" | "option" | "bond" | "future" | "forex")[]>; date: z.ZodOptional<z.ZodEffects<z.ZodString, string | number | Date | null, string>>; }, "strip", z.ZodTypeAny, { markets: ("equity" | "option" | "bond" | "future" | "forex")[]; date?: string | number | Date | null | undefined; }, { markets: "equity" | "option" | "bond" | "future" | "forex" | ("equity" | "option" | "bond" | "future" | "forex")[]; date?: string | undefined; }>; export type GetMarketHoursParams = z.infer<typeof GetMarketHoursParams>; export declare const GetMarketHoursResponse: z.ZodRecord<z.ZodEnum<["equity", "option", "bond", "future", "forex"]>, z.ZodRecord<z.ZodString, z.ZodObject<{ date: z.ZodOptional<z.ZodEffects<z.ZodString, string | number | Date | null, string>>; marketType: z.ZodEnum<["BOND", "EQUITY", "ETF", "EXTENDED", "FOREX", "FUTURE", "FUTURE_OPTION", "FUNDAMENTAL", "INDEX", "INDICATOR", "MUTUAL_FUND", "OPTION", "UNKNOWN"]>; exchange: z.ZodOptional<z.ZodString>; category: z.ZodOptional<z.ZodString>; product: z.ZodOptional<z.ZodString>; productName: z.ZodOptional<z.ZodString>; isOpen: z.ZodBoolean; sessionHours: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{ start: z.ZodString; end: z.ZodString; }, "strip", z.ZodTypeAny, { start: string; end: string; }, { start: string; end: string; }>, "many">>>; }, "strip", z.ZodTypeAny, { marketType: "UNKNOWN" | "BOND" | "EQUITY" | "ETF" | "EXTENDED" | "FOREX" | "FUTURE" | "FUTURE_OPTION" | "FUNDAMENTAL" | "INDEX" | "INDICATOR" | "MUTUAL_FUND" | "OPTION"; isOpen: boolean; date?: string | number | Date | null | undefined; exchange?: string | undefined; category?: string | undefined; product?: string | undefined; productName?: string | undefined; sessionHours?: Record<string, { start: string; end: string; }[]> | undefined; }, { marketType: "UNKNOWN" | "BOND" | "EQUITY" | "ETF" | "EXTENDED" | "FOREX" | "FUTURE" | "FUTURE_OPTION" | "FUNDAMENTAL" | "INDEX" | "INDICATOR" | "MUTUAL_FUND" | "OPTION"; isOpen: boolean; date?: string | undefined; exchange?: string | undefined; category?: string | undefined; product?: string | undefined; productName?: string | undefined; sessionHours?: Record<string, { start: string; end: string; }[]> | undefined; }>>>; export type GetMarketHoursResponse = z.infer<typeof GetMarketHoursResponse>; export declare const GetMarketHoursByMarketIdPathParams: z.ZodObject<{ market_id: z.ZodEnum<["equity", "option", "bond", "future", "forex"]>; }, "strip", z.ZodTypeAny, { market_id: "equity" | "option" | "bond" | "future" | "forex"; }, { market_id: "equity" | "option" | "bond" | "future" | "forex"; }>; export type GetMarketHoursByMarketIdPathParams = z.infer<typeof GetMarketHoursByMarketIdPathParams>; export declare const GetMarketHoursByMarketIdQueryParams: z.ZodObject<{ date: z.ZodOptional<z.ZodEffects<z.ZodString, string | number | Date | null, string>>; }, "strip", z.ZodTypeAny, { date?: string | number | Date | null | undefined; }, { date?: string | undefined; }>; export type GetMarketHoursByMarketIdQueryParams = z.infer<typeof GetMarketHoursByMarketIdQueryParams>; export declare const GetMarketHoursByMarketIdResponse: z.ZodRecord<z.ZodEnum<["equity", "option", "bond", "future", "forex"]>, z.ZodRecord<z.ZodString, z.ZodObject<{ date: z.ZodOptional<z.ZodEffects<z.ZodString, string | number | Date | null, string>>; marketType: z.ZodEnum<["BOND", "EQUITY", "ETF", "EXTENDED", "FOREX", "FUTURE", "FUTURE_OPTION", "FUNDAMENTAL", "INDEX", "INDICATOR", "MUTUAL_FUND", "OPTION", "UNKNOWN"]>; exchange: z.ZodOptional<z.ZodString>; category: z.ZodOptional<z.ZodString>; product: z.ZodOptional<z.ZodString>; productName: z.ZodOptional<z.ZodString>; isOpen: z.ZodBoolean; sessionHours: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{ start: z.ZodString; end: z.ZodString; }, "strip", z.ZodTypeAny, { start: string; end: string; }, { start: string; end: string; }>, "many">>>; }, "strip", z.ZodTypeAny, { marketType: "UNKNOWN" | "BOND" | "EQUITY" | "ETF" | "EXTENDED" | "FOREX" | "FUTURE" | "FUTURE_OPTION" | "FUNDAMENTAL" | "INDEX" | "INDICATOR" | "MUTUAL_FUND" | "OPTION"; isOpen: boolean; date?: string | number | Date | null | undefined; exchange?: string | undefined; category?: string | undefined; product?: string | undefined; productName?: string | undefined; sessionHours?: Record<string, { start: string; end: string; }[]> | undefined; }, { marketType: "UNKNOWN" | "BOND" | "EQUITY" | "ETF" | "EXTENDED" | "FOREX" | "FUTURE" | "FUTURE_OPTION" | "FUNDAMENTAL" | "INDEX" | "INDICATOR" | "MUTUAL_FUND" | "OPTION"; isOpen: boolean; date?: string | undefined; exchange?: string | undefined; category?: string | undefined; product?: string | undefined; productName?: string | undefined; sessionHours?: Record<string, { start: string; end: string; }[]> | undefined; }>>>; export type GetMarketHoursByMarketIdResponse = z.infer<typeof GetMarketHoursByMarketIdResponse>; export declare const GetMarketHoursByMarketIdParams: z.ZodObject<{ date: z.ZodOptional<z.ZodEffects<z.ZodString, string | number | Date | null, string>>; } & { market_id: z.ZodEnum<["equity", "option", "bond", "future", "forex"]>; }, "strip", z.ZodTypeAny, { market_id: "equity" | "option" | "bond" | "future" | "forex"; date?: string | number | Date | null | undefined; }, { market_id: "equity" | "option" | "bond" | "future" | "forex"; date?: string | undefined; }>; export type GetMarketHoursByMarketIdParams = z.infer<typeof GetMarketHoursByMarketIdParams>; export {};