SnapTrade.Net 6.0.48

dotnet add package SnapTrade.Net --version 6.0.48
                    
NuGet\Install-Package SnapTrade.Net -Version 6.0.48
                    
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="SnapTrade.Net" Version="6.0.48" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SnapTrade.Net" Version="6.0.48" />
                    
Directory.Packages.props
<PackageReference Include="SnapTrade.Net" />
                    
Project file
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 SnapTrade.Net --version 6.0.48
                    
#r "nuget: SnapTrade.Net, 6.0.48"
                    
#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 SnapTrade.Net@6.0.48
                    
#: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=SnapTrade.Net&version=6.0.48
                    
Install as a Cake Addin
#tool nuget:?package=SnapTrade.Net&version=6.0.48
                    
Install as a Cake Tool

SnapTrade.Net - C#

NuGet More Info

Connect brokerage accounts to your app for live positions and trading.

Rate limiting

Two limits apply to requests signed with your clientId. The stricter one wins, and exceeding either returns 429 Too Many Requests.

  • Customer-level — 250 requests/minute by default, scoped to your clientId and applied across all endpoints. Reported in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset.
  • Account-level — 10 requests/minute per account, scoped to (clientId, accountId). All covered operations for one account draw on the same bucket — reading balances and reading positions share it — and enforcement does not depend on the HTTP method, so updating an account consumes the same bucket as reading it. Only enforced for Personal users, and only for integrations it has been rolled out to — it is not yet in force for every Personal integration. It also does not apply on every operation that documents a 429 below. Where it applies it is reported in X-RateLimit-Account-Limit, X-RateLimit-Account-Remaining and X-RateLimit-Account-Reset. Do not read the absence of those headers as proof the limit is off — some configurations omit the rate limit headers while still enforcing the limit, so header absence tells you nothing about your allowance.

On a 429, X-RateLimit-Remaining: 0 means you hit the customer-level limit and X-RateLimit-Account-Remaining: 0 means the account-level one. Wait for the corresponding *-Reset value (seconds) before retrying, or fall back to exponential backoff with jitter.

Not every 429 is explained by those headers. A separate per-authenticated-user limit, reported in no X-RateLimit-* header, covers OAuth-authenticated requests and signed requests in configurations where the customer-level limit is not in effect — on the operations that use the default throttles. A few operations override those and are governed by the customer-level limit alone. The two do not stack: a signed request governed by the customer-level limit above is not additionally subject to the per-user one. If a 429 arrives with no header at zero — or with no X-RateLimit-* headers at all — honour Retry-After and back off. Treat the remaining counts as a hint, not a guarantee that the next request will succeed.

Because the customer-level limit applies everywhere, any signed request can return 429.

OAuth-authenticated requests are an exception. They are not subject to the customer-level limit and do not receive X-RateLimit-Limit, X-RateLimit-Remaining or X-RateLimit-Reset — do not wait on those headers or design around a customer-level allowance on this path. The account-level limit still applies to them on the account-data endpoints above, reported in the X-RateLimit-Account-* headers. On operations using the default throttles the per-user limit above applies to them as well, so an OAuth request can be rejected while the account headers still show capacity; on the few operations that override those throttles, OAuth callers have no per-user ceiling at all. Drive retries from Retry-After and exponential backoff with jitter rather than from the headers.

See https://docs.snaptrade.com/docs/ratelimiting.

Frameworks supported

  • .NET Core >=1.0
  • .NET Framework >=4.6
  • Mono/Xamarin >=vNext

Installation

Using the .NET Core command-line interface (CLI) tools:

dotnet add package SnapTrade.Net

Using the NuGet Command Line Interface (CLI):

nuget install SnapTrade.Net

Using the Package Manager Console:

Install-Package SnapTrade.Net

From within Visual Studio:

  1. Open the Solution Explorer.
  2. Right-click on a project within your solution.
  3. Click on Manage NuGet Packages...
  4. Click on the Browse tab and search for "SnapTrade.Net".
  5. Click on the "SnapTrade.Net" package, select the appropriate version in the right-tab and click Install.

Getting Started

using System;
using System.Collections.Generic;
using System.Diagnostics;
using SnapTrade.Net.Client;
using SnapTrade.Net.Model;

namespace Example
{
    public class GetAccountActivitiesExample
    {
        public static void Main()
        {
            Snaptrade client = new Snaptrade();
            // Configure custom BasePath if desired
            // client.SetBasePath("https://api.snaptrade.com/api/v1");
            client.SetClientId(System.Environment.GetEnvironmentVariable("SNAPTRADE_CLIENT_ID"));
            client.SetConsumerKey(System.Environment.GetEnvironmentVariable("SNAPTRADE_CONSUMER_KEY"));

            var accountId = "917c8734-8470-4a3e-a18f-57c3f2ee6631";
            var userId = "snaptrade-user-123";
            var userSecret = "adf2aa34-8219-40f7-a6b3-60156985cc61";
            var startDate = DateTime.Parse("2022-01-24"); // The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`. (optional) 
            var endDate = DateTime.Parse("2022-01-24"); // The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`. (optional) 
            var offset = 56; // An integer that specifies the starting point of the paginated results. Default is 0. (optional) 
            var limit = 56; // An integer that specifies the maximum number of transactions to return. Default of 1000. (optional) 
            var type = "BUY,SELL,DIVIDEND"; // Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values:   - `BUY` - Asset bought.   - `SELL` - Asset sold.   - `DIVIDEND` - Dividend payout.   - `SUBSTITUTE_DIVIDEND` - Payment in lieu of a dividend.   - `CONTRIBUTION` - Cash contribution.   - `WITHDRAWAL` - Cash withdrawal.   - `REI` - Dividend reinvestment.   - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash   - `INTEREST` - Interest deposited into the account.   - `FEE` - Fee withdrawn from the account.   - `TAX` - A tax related fee.   - `OPTIONEXPIRATION` - Option expiration event.   - `OPTIONASSIGNMENT` - Option assignment event.   - `OPTIONEXERCISE` - Option exercise event.   - `TRANSFER` - Transfer of assets from one account to another.   - `SPLIT` - A stock share split.  (optional) 
            
            try
            {
                // List account activities
                PaginatedUniversalActivity result = client.AccountInformation.GetAccountActivities(accountId, userId, userSecret, startDate, endDate, offset, limit, type);
                Console.WriteLine(result);
            }
            catch (ApiException e)
            {
                Console.WriteLine("Exception when calling AccountInformationApi.GetAccountActivities: " + e.Message);
                Console.WriteLine("Status Code: "+ e.ErrorCode);
                Console.WriteLine(e.StackTrace);
            }
            catch (ClientException e)
            {
                Console.WriteLine(e.Response.StatusCode);
                Console.WriteLine(e.Response.RawContent);
                Console.WriteLine(e.InnerException);
            }
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.snaptrade.com

Class Method HTTP request Description
AccountInformationApi GetAccountActivities GET /accounts/{accountId}/activities List account activities
AccountInformationApi GetAccountBalanceHistory GET /accounts/{accountId}/balanceHistory List historical account total value
AccountInformationApi GetAccountBalancesV2 GET /accounts/{accountId}/balances/v2 List account balances (V2)
AccountInformationApi GetAccountDetails GET /accounts/{accountId}/details Get account details
AccountInformationApi GetAllAccountPositions GET /accounts/{accountId}/positions/all List all account positions
AccountInformationApi GetUserAccountBalance GET /accounts/{accountId}/balances List account balances
AccountInformationApi GetUserAccountDetails GET /accounts/{accountId} Get account detail
AccountInformationApi GetUserAccountOrderDetail POST /accounts/{accountId}/orders/details Get account order detail
AccountInformationApi GetUserAccountOrders GET /accounts/{accountId}/orders List account orders
AccountInformationApi GetUserAccountRecentOrders GET /accounts/{accountId}/recentOrders List account recent orders (last 24 hours only)
AccountInformationApi GetUserAccountReturnRates GET /accounts/{accountId}/returnRates List account rate of returns
AccountInformationApi GetUserHoldings GET /accounts/{accountId}/holdings List account holdings
AccountInformationApi ListAllUserAccounts GET /accounts/all List all user accounts
AccountInformationApi ListUserAccounts GET /accounts List user accounts
AccountInformationApi UpdateUserAccount PUT /accounts/{accountId} Update details of an investment account
APIStatusApi Check GET / Get API Status
AuthenticationApi DeleteSnapTradeUser DELETE /snapTrade/deleteUser Delete user
AuthenticationApi ListSnapTradeUsers GET /snapTrade/listUsers List all users
AuthenticationApi LoginSnapTradeUser POST /snapTrade/login Generate Connection Portal URL
AuthenticationApi RegisterSnapTradeUser POST /snapTrade/registerUser Register user
AuthenticationApi ResetSnapTradeUserSecret POST /snapTrade/resetUserSecret Rotate user secret
ConnectionsApi DeleteConnection DELETE /connection/{connectionId} Delete connection
ConnectionsApi DetailBrokerageAuthorization GET /authorizations/{authorizationId} Get connection detail
ConnectionsApi DisableBrokerageAuthorization POST /authorizations/{authorizationId}/disable Force disable connection
ConnectionsApi ListBrokerageAuthorizationAccounts GET /authorizations/{authorizationId}/accounts List accounts for a connection
ConnectionsApi ListBrokerageAuthorizations GET /authorizations List all connections
ConnectionsApi ListConnectionAccounts GET /connections/{connectionId}/accounts List accounts
ConnectionsApi RefreshBrokerageAuthorization POST /authorizations/{authorizationId}/refresh Refresh holdings for a connection
ConnectionsApi ReturnRates GET /authorizations/{authorizationId}/returnRates List connection rate of returns
ConnectionsApi SyncBrokerageAuthorizationTransactions POST /authorizations/{authorizationId}/transactions/sync Sync transactions for a connection
ExperimentalEndpointsApi AddSubscription POST /snapTrade/tradeDetection/subscriptions Add a Trade Detection subscription
ExperimentalEndpointsApi CancelSubscription POST /snapTrade/tradeDetection/subscriptions/cancel Cancel a Trade Detection subscription
ExperimentalEndpointsApi GetAllAccountOrders GET /accounts/{accountId}/orders/all List all account orders
ExperimentalEndpointsApi GetUserAccountOrderDetailV2 GET /accounts/{accountId}/orders/details/v2/{brokerageOrderId} Get account order detail (V2)
ExperimentalEndpointsApi GetUserAccountOrdersV2 GET /accounts/{accountId}/orders/v2 List account orders v2
ExperimentalEndpointsApi GetUserAccountRecentOrdersV2 GET /accounts/{accountId}/recentOrders/v2 List account recent orders (V2, last 24 hours only)
ExperimentalEndpointsApi ListSubscriptions GET /snapTrade/tradeDetection/subscriptions List active Trade Detection subscriptions
ExperimentalEndpointsApi PlaceSimpleOrder POST /accounts/{accountId}/trading/simple Place a simple order (beta)
ManagementApi GetStats GET /management/stats Get usage stats (beta)
ManagementApi GetStatsLegacy GET /snapTrade/stats Get usage stats (deprecated)
ReferenceDataApi GetPartnerInfo GET /snapTrade/partners Get Client Info
ReferenceDataApi GetStockExchanges GET /exchanges Get exchanges
ReferenceDataApi GetSymbols POST /symbols Search symbols
ReferenceDataApi GetSymbolsByTicker GET /symbols/{query} Get symbol detail
ReferenceDataApi ListAllBrokerageAuthorizationType GET /brokerageAuthorizationTypes Get all brokerage authorization types
ReferenceDataApi ListAllBrokerageInstruments GET /brokerages/{slug}/instruments Get brokerage instruments
ReferenceDataApi ListAllBrokerages GET /brokerages Get brokerages
ReferenceDataApi ListInstitutions GET /institutions List institutions
ReferenceDataApi SymbolSearchUserAccount POST /accounts/{accountId}/symbols Search account symbols
TradingApi CancelOrder POST /accounts/{accountId}/trading/cancel Cancel order
TradingApi GetCryptocurrencyPairQuote GET /accounts/{accountId}/trading/instruments/cryptocurrencyPairs/{instrumentSymbol}/quote Get crypto pair quote
TradingApi GetOptionImpact POST /accounts/{accountId}/trading/options/impact Get option order impact
TradingApi GetOrderImpact POST /trade/impact Check equity order impact
TradingApi GetUserAccountOptionQuotes GET /accounts/{accountId}/quotes/options Get option quote
TradingApi GetUserAccountQuotes GET /accounts/{accountId}/quotes Get equity symbol quotes
TradingApi PlaceComplexOrder POST /accounts/{accountId}/trading/complex Place complex order
TradingApi PlaceCryptoOrder POST /accounts/{accountId}/trading/crypto Place crypto order
TradingApi PlaceForceOrder POST /trade/place Place equity order
TradingApi PlaceMlegOrder POST /accounts/{accountId}/trading/options Place option order
TradingApi PlaceOrder POST /trade/{tradeId} Place checked equity order
TradingApi PreviewCryptoOrder POST /accounts/{accountId}/trading/crypto/preview Preview crypto order
TradingApi ReplaceOrder POST /accounts/{accountId}/trading/replace Replace order
TradingApi SearchCryptocurrencyPairInstruments GET /accounts/{accountId}/trading/instruments/cryptocurrencyPairs Get crypto pairs

Documentation for Models

Dependencies

Author

This C# package is automatically generated by Konfig

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  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 is compatible.  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.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
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
6.0.48 47 10/23/2026
6.0.47 41 10/23/2026
6.0.46 42 10/23/2026
6.0.45 51 10/23/2026
6.0.44 62 10/21/2026
6.0.43 51 10/21/2026
6.0.42 61 10/20/2026
6.0.41 68 10/19/2026
6.0.40 90 10/19/2026
6.0.39 104 10/19/2026
6.0.38 348 10/14/2026
6.0.37 86 10/14/2026
6.0.36 207 10/13/2026
6.0.35 349 10/9/2026
6.0.34 94 10/8/2026
6.0.33 95 10/8/2026
6.0.32 99 10/7/2026
6.0.31 98 10/7/2026
6.0.30 536 10/5/2026
6.0.29 118 10/2/2026
Loading failed

Minor update