Install-Package TdAmeritrade.Net -Version 1.0.0-preview.0.16
dotnet add package TdAmeritrade.Net --version 1.0.0-preview.0.16
<PackageReference Include="TdAmeritrade.Net" Version="1.0.0-preview.0.16" />
paket add TdAmeritrade.Net --version 1.0.0-preview.0.16
#r "nuget: TdAmeritrade.Net, 1.0.0-preview.0.16"
// 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
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.
PM > Install-Package TdAmeritrade.Net
How it works?
You can make all calls to Td Ameritrade's API via the
var client = new TdAmeritradeApi( clientId: "<client id>"); // Retrieving a user's recent transactions. var result = await client.GetTransactions( refreshToken: "<refreshToken>", accountId: "<account_id>");
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
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, 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
TdAmeritradeApiinstance for the given values.
services.AddTdAmeritradeApi(string clientId): In this version,
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
services.AddTdAmeritradeApi(string clientId, string refreshToken): In this version, only
TdAmeritradeApiis added to the DI system. All instances will be fixed to the provided client ID and refresh token.
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.
|.NET||net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows|
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.