@sudowealth/schwab-api
Version:
TypeScript client for Charles Schwab API with OAuth support, market data, trading functionality, and complete type safety
78 lines (77 loc) • 1.85 kB
TypeScript
/**
* Central file for all API constants, URLs, and paths
* This helps avoid duplication and ensures consistency across the codebase
*/
export declare const API_URLS: {
PRODUCTION: string;
SANDBOX: string;
};
export declare const API_VERSIONS: {
v1: string;
};
export declare const OAUTH_ENDPOINTS: {
AUTHORIZE: string;
TOKEN: string;
};
export declare const MARKET_DATA: {
QUOTES: {
GET_QUOTES: string;
GET_QUOTE: string;
};
OPTIONS: {
GET_OPTION_CHAIN: string;
GET_OPTION_EXPIRATION_CHAIN: string;
};
PRICE_HISTORY: {
GET_PRICE_HISTORY: string;
};
MOVERS: {
GET_MOVERS: string;
};
MARKET_HOURS: {
GET_HOURS_FOR_MULTIPLE_MARKETS: string;
GET_HOURS_FOR_SINGLE_MARKET: string;
};
INSTRUMENTS: {
GET_INSTRUMENTS: string;
GET_INSTRUMENT: string;
};
};
export declare const TRADER: {
ACCOUNTS: {
GET_ACCOUNTS: string;
GET_ACCOUNT: string;
GET_ACCOUNT_NUMBERS: string;
};
ORDERS: {
GET_ORDERS: string;
GET_ORDERS_FOR_ACCOUNT: string;
GET_ORDER: string;
PLACE_ORDER: string;
REPLACE_ORDER: string;
CANCEL_ORDER: string;
};
TRANSACTIONS: {
GET_TRANSACTIONS: string;
GET_TRANSACTION: string;
};
USER_PREFERENCES: {
GET_USER_PREFERENCES: string;
};
};
export declare const MEDIA_TYPES: {
JSON: string;
FORM: string;
};
export declare const OAUTH_GRANT_TYPES: {
AUTHORIZATION_CODE: string;
REFRESH_TOKEN: string;
};
export declare const ENVIRONMENTS: {
readonly PRODUCTION: "production";
readonly SANDBOX: "sandbox";
};
export type Environment = (typeof ENVIRONMENTS)[keyof typeof ENVIRONMENTS];
export declare const TIMEOUTS: {
DEFAULT_REQUEST: number;
};