TdAmeritrade.Net 1.0.0-preview.0.16

This is a prerelease version of TdAmeritrade.Net.
dotnet add package TdAmeritrade.Net --version 1.0.0-preview.0.16
NuGet\Install-Package TdAmeritrade.Net -Version 1.0.0-preview.0.16
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="TdAmeritrade.Net" Version="1.0.0-preview.0.16" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TdAmeritrade.Net --version 1.0.0-preview.0.16
#r "nuget: TdAmeritrade.Net, 1.0.0-preview.0.16"
#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.
// Install TdAmeritrade.Net as a Cake Addin
#addin nuget:?package=TdAmeritrade.Net&version=1.0.0-preview.0.16&prerelease

// Install TdAmeritrade.Net as a Cake Tool
#tool nuget:?package=TdAmeritrade.Net&version=1.0.0-preview.0.16&prerelease

Going.Plaid

Build status NuGet

What is TdAmeritrade.Net?

TdAmeritrade.Net is an unofficial library for interacting with Td Ameritrade's APIs. It is supported for .net core 3.1, and .net 5.0+.

Where can I get it?

TdAmeritrade.Net is available at nuget.org.

Package Manager PM > Install-Package TdAmeritrade.Net

How it works?

You can make all calls to Td Ameritrade's API via the TdAmeritrade.TdAmeritradeApi class.

var client = new TdAmeritradeApi(
	clientId: "<client id>");

// Retrieving a user's recent transactions.
var result = await client.GetTransactions(
	refreshToken: "<refreshToken>",
	accountId: "<account_id>");
Usage

The TdAmeritradeApi class is expected in general to be a short-lived object provided by the DI system on a unit-of-work basis. The access token generated from a refresh token is cached externally using an IMemoryCache provided by the DI system.

If the object is used in a short-lived console application, then a single instance can be held for the lifetime of the application. For all other uses, it is expected to use the DI system.

.NET Core Configuration Options

Easy to use:

There are three ways to add TdAmeritradeApi to the DI system:

  • services.AddTdAmeritradeApi(): In this version, Func<string, TdAmeritradeApi> and Func<string, string, TdAmeritradeApi> are added to the DI system. In this version, either the client ID or both the client ID and the refresh token can be provided to generate a TdAmeritradeApi instance for the given values.
  • services.AddTdAmeritradeApi(string clientId): In this version, TdAmeritradeApi and Func<string, TdAmeritradeApi> are added to the DI system. In this version, the client ID is fixed for all instance, and the refresh token may be added additionally for each TdAmeritradeApi instance.
  • services.AddTdAmeritradeApi(string clientId, string refreshToken): In this version, only TdAmeritradeApi is added to the DI system. All instances will be fixed to the provided client ID and refresh token.
IHttpClientFactory

Going.Plaid supports the IHttpClientFactory for correct usage of HttpClient, as described here. If you choose not to call .AddTdAmeritradeApi(), because you need to customize your DI structure, it is recommended that you call services.AddITdAmeritradeApiRefitClient() to properly configure the ITdAmeritradeApi refit client for TdAmeritrade.Net usage.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.0.0-preview.0.16 155 5/22/2022