@sudowealth/schwab-api
Version:
TypeScript client for Charles Schwab API with OAuth support, market data, trading functionality, and complete type safety
28 lines (27 loc) • 1.18 kB
JavaScript
import { TRADER } from '../../constants.js';
import { ErrorResponseSchema } from '../../errors.js';
import { GetAccountsQueryParams, GetAccountsResponse, GetAccountByNumberPathParams, GetAccountByNumberQueryParams, GetAccountByNumberResponse, GetAccountNumbersResponse, } from './schema.js';
export const getAccountsMeta = {
method: 'GET',
path: TRADER.ACCOUNTS.GET_ACCOUNTS,
querySchema: GetAccountsQueryParams,
responseSchema: GetAccountsResponse,
errorSchema: ErrorResponseSchema,
description: 'Get all accounts for the authenticated user.',
};
export const getAccountByNumberMeta = {
method: 'GET',
path: TRADER.ACCOUNTS.GET_ACCOUNT,
pathSchema: GetAccountByNumberPathParams,
querySchema: GetAccountByNumberQueryParams,
responseSchema: GetAccountByNumberResponse,
errorSchema: ErrorResponseSchema,
description: 'Get a specific account by account number.',
};
export const getAccountNumbersMeta = {
method: 'GET',
path: TRADER.ACCOUNTS.GET_ACCOUNT_NUMBERS,
responseSchema: GetAccountNumbersResponse,
errorSchema: ErrorResponseSchema,
description: 'Get account numbers for the authenticated user.',
};