UNPKG

@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.17 kB
import { TRADER } from '../../constants'; import { ErrorResponseSchema } from '../../errors'; import { GetAccountsQueryParams, GetAccountsResponse, GetAccountByNumberPathParams, GetAccountByNumberQueryParams, GetAccountByNumberResponse, GetAccountNumbersResponse, } from './schema'; 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.', };