TdAmeritrade.Net
1.0.0-preview.0.16
dotnet add package TdAmeritrade.Net --version 1.0.0-preview.0.16
NuGet\Install-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
Going.Plaid
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>
andFunc<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 aTdAmeritradeApi
instance for the given values.services.AddTdAmeritradeApi(string clientId)
: In this version,TdAmeritradeApi
andFunc<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 eachTdAmeritradeApi
instance.services.AddTdAmeritradeApi(string clientId, string refreshToken)
: In this version, onlyTdAmeritradeApi
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 | Versions 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. |
-
.NETCoreApp 3.1
- Microsoft.Extensions.Caching.Memory (>= 6.0.1)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.1)
- Refit.HttpClientFactory (>= 6.3.2)
-
net6.0
- Microsoft.Extensions.Caching.Memory (>= 6.0.1)
- Microsoft.Extensions.DependencyInjection (>= 6.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.1)
- Refit.HttpClientFactory (>= 6.3.2)
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 | 161 | 5/22/2022 |