SchwabApi.Models
1.0.0-beta.1
This is a prerelease version of SchwabApi.Models.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package SchwabApi.Models --version 1.0.0-beta.1
NuGet\Install-Package SchwabApi.Models -Version 1.0.0-beta.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SchwabApi.Models" Version="1.0.0-beta.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SchwabApi.Models" Version="1.0.0-beta.1" />
<PackageReference Include="SchwabApi.Models" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SchwabApi.Models --version 1.0.0-beta.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SchwabApi.Models, 1.0.0-beta.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SchwabApi.Models@1.0.0-beta.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SchwabApi.Models&version=1.0.0-beta.1&prerelease
#tool nuget:?package=SchwabApi.Models&version=1.0.0-beta.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SchwabApi.Models
Strongly-typed data models for Charles Schwab Trading API including accounts, market data, trading, and transactions.
Installation
dotnet add package SchwabApi.Models
Or via NuGet Package Manager:
Install-Package SchwabApi.Models
Features
- 60+ Data Models: Complete coverage of Schwab API response types
- 30+ Enumerations: Type-safe enums for order types, statuses, asset types, etc.
- JSON Serialization: Configured for Schwab API naming conventions
- Nullable Annotations: C# 10 nullable reference types for compile-time safety
- XML Documentation: IntelliSense-friendly documentation for all public types
Usage
Models are automatically deserialized when using SchwabApi.Client:
using SchwabApi.Models.Accounts;
using SchwabApi.Client;
var client = serviceProvider.GetRequiredService<ISchwabApiClient>();
// Get account information
var account = await client.GetAsync<AccountResponse>("/trader/v1/accounts/12345678");
Console.WriteLine($"Account Value: ${account.SecuritiesAccount.CurrentBalances.LiquidationValue:N2}");
Model Categories
Accounts (SchwabApi.Models.Accounts)
AccountResponse- Account details with positions and balancesPosition- Equity/option position dataBalance- Account balance information
Market Data (SchwabApi.Models.MarketData)
Quote- Real-time quote dataCandle- OHLCV price historyOptionChain- Option chain dataMoverResponse- Market movers
Trading (SchwabApi.Models.Trading)
OrderRequest- Order placement/modificationOrderResponse- Order status and detailsOrderLeg- Multi-leg order components
Transactions (SchwabApi.Models.Transactions)
TransactionResponse- Account transaction history
Enums (SchwabApi.Models.Enums)
OrderType: MARKET, LIMIT, STOP, STOP_LIMITOrderStatus: PENDING, FILLED, CANCELED, REJECTEDAssetType: EQUITY, OPTION, MUTUAL_FUNDInstruction: BUY, SELL, BUY_TO_OPEN, SELL_TO_CLOSE
JSON Serialization
Models use custom SchwabJsonSerializerOptions for API compatibility:
using SchwabApi.Models;
using System.Text.Json;
var options = SchwabJsonSerializerOptions.Default;
var json = JsonSerializer.Serialize(order, options);
Documentation
License
MIT License - see LICENSE for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Newtonsoft.Json (>= 13.0.3)
- System.Text.Json (>= 8.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|