All packages
npm package
@pyriter/schwab-client
A typed Charles Schwab developer API client for Node.js.
Installation
$ npm install @pyriter/schwab-client
$ pnpm add @pyriter/schwab-client
$ yarn add @pyriter/schwab-client
$ bun add @pyriter/schwab-client
Overview
OAuth, accounts, quotes, and order placement against the Charles Schwab developer API — wrapped in a typed, ergonomic client.
- OAuth 2.0 token refresh handled for you
- Typed account, quote, and order endpoints
- Pluggable HTTP transport for tests
- MIT licensed
Usage
Quote a symbol
import { SchwabClient } from '@pyriter/schwab-client';
const client = new SchwabClient({
clientId: process.env.SCHWAB_CLIENT_ID!,
clientSecret: process.env.SCHWAB_CLIENT_SECRET!,
refreshToken: process.env.SCHWAB_REFRESH_TOKEN!,
});
const quote = await client.quotes.get('AAPL');
console.log(quote.lastPrice); Keywords
Schwabtradingfinance APITypeScript