SnapTrade.Net
5.0.61
.NET 5.0
This package targets .NET 5.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SnapTrade.Net --version 5.0.61
NuGet\Install-Package SnapTrade.Net -Version 5.0.61
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="5.0.61" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SnapTrade.Net" Version="5.0.61" />
<PackageReference Include="SnapTrade.Net" />
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 5.0.61
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SnapTrade.Net, 5.0.61"
#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@5.0.61
#: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=5.0.61
#tool nuget:?package=SnapTrade.Net&version=5.0.61
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SnapTrade.Net - C#
Connect brokerage accounts to your app for live positions and trading
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:
- Open the Solution Explorer.
- Right-click on a project within your solution.
- Click on Manage NuGet Packages...
- Click on the Browse tab and search for "SnapTrade.Net".
- 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 GetAllUserHoldingsExample
{
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 userId = "userId_example";
var userSecret = "userSecret_example";
var brokerageAuthorizations = "917c8734-8470-4a3e-a18f-57c3f2ee6631"; // Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations). (optional)
try
{
// List all accounts for the user, plus balances, positions, and orders for each account.
List<AccountHoldings> result = client.AccountInformation.GetAllUserHoldings(userId, userSecret, brokerageAuthorizations);
Console.WriteLine(result);
}
catch (ApiException e)
{
Console.WriteLine("Exception when calling AccountInformationApi.GetAllUserHoldings: " + 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/api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AccountInformationApi | GetAllUserHoldings | GET /holdings | List all accounts for the user, plus balances, positions, and orders for each account. |
| AccountInformationApi | GetUserAccountBalance | GET /accounts/{accountId}/balances | List account balances |
| AccountInformationApi | GetUserAccountDetails | GET /accounts/{accountId} | Get account detail |
| AccountInformationApi | GetUserAccountOrders | GET /accounts/{accountId}/orders | List account recent orders |
| AccountInformationApi | GetUserAccountPositions | GET /accounts/{accountId}/positions | List account positions |
| AccountInformationApi | GetUserAccountRecentOrders | GET /accounts/{accountId}/recentOrders | List account recent executed orders |
| AccountInformationApi | GetUserAccountReturnRates | GET /accounts/{accountId}/returnRates | List account rate of returns |
| AccountInformationApi | GetUserHoldings | GET /accounts/{accountId}/holdings | List account holdings |
| AccountInformationApi | ListUserAccounts | GET /accounts | List 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 | DetailBrokerageAuthorization | GET /authorizations/{authorizationId} | Get connection detail |
| ConnectionsApi | DisableBrokerageAuthorization | POST /authorizations/{authorizationId}/disable | Force disable connection |
| ConnectionsApi | ListBrokerageAuthorizations | GET /authorizations | List all connections |
| ConnectionsApi | RefreshBrokerageAuthorization | POST /authorizations/{authorizationId}/refresh | Refresh holdings for a connection |
| ConnectionsApi | RemoveBrokerageAuthorization | DELETE /authorizations/{authorizationId} | Delete connection |
| ConnectionsApi | ReturnRates | GET /authorizations/{authorizationId}/returnRates | List connection rate of returns |
| ConnectionsApi | SessionEvents | GET /sessionEvents | Get all session events for a user |
| OptionsApi | GetOptionStrategy | POST /accounts/{accountId}/optionStrategy | Create options strategy |
| OptionsApi | GetOptionsChain | GET /accounts/{accountId}/optionsChain | Get the options chain for a symbol |
| OptionsApi | GetOptionsStrategyQuote | GET /accounts/{accountId}/optionStrategy/{optionStrategyId} | Get options strategy quotes |
| OptionsApi | ListOptionHoldings | GET /accounts/{accountId}/options | List account option positions |
| OptionsApi | PlaceOptionStrategy | POST /accounts/{accountId}/optionStrategy/{optionStrategyId}/execute | Place an option strategy order |
| ReferenceDataApi | GetCurrencyExchangeRatePair | GET /currencies/rates/{currencyPair} | Get exchange rate of a currency pair |
| ReferenceDataApi | GetPartnerInfo | GET /snapTrade/partners | Get Client Info |
| ReferenceDataApi | GetSecurityTypes | GET /securityTypes | List security types |
| 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 | ListAllBrokerages | GET /brokerages | Get brokerages |
| ReferenceDataApi | ListAllCurrencies | GET /currencies | Get currencies |
| ReferenceDataApi | ListAllCurrenciesRates | GET /currencies/rates | Get currency exchange rates |
| ReferenceDataApi | SymbolSearchUserAccount | POST /accounts/{accountId}/symbols | Search account symbols |
| TradingApi | CancelUserAccountOrder | POST /accounts/{accountId}/orders/cancel | Cancel order |
| TradingApi | GetOrderImpact | POST /trade/impact | Check order impact |
| TradingApi | GetUserAccountQuotes | GET /accounts/{accountId}/quotes | Get symbol quotes |
| TradingApi | PlaceForceOrder | POST /trade/place | Place order |
| TradingApi | PlaceOrder | POST /trade/{tradeId} | Place checked order |
| TransactionsAndReportingApi | GetActivities | GET /activities | Get transaction history for a user |
| TransactionsAndReportingApi | GetReportingCustomRange | GET /performance/custom | Get performance information for a specific timeframe |
Documentation for Models
- Account
- AccountBalance
- AccountBalanceTotal
- AccountHoldings
- AccountHoldingsAccount
- AccountOrderRecord
- AccountOrderRecordOptionSymbol
- AccountOrderRecordStatus
- AccountOrderRecordUniversalSymbol
- AccountSimple
- AccountSyncStatus
- ActionStrict
- ActionStrictWithOptions
- AuthenticationLoginSnapTradeUser200Response
- Balance
- BalanceCurrency
- Brokerage
- BrokerageAuthorization
- BrokerageAuthorizationDisabledConfirmation
- BrokerageAuthorizationRefreshConfirmation
- BrokerageAuthorizationTypeReadOnly
- BrokerageAuthorizationTypeReadOnlyBrokerage
- BrokerageType
- ConnectionsSessionEvents200ResponseInner
- Currency
- CurrencyNullable
- DeleteUserResponse
- DividendAtDate
- EncryptedResponse
- EncryptedResponseEncryptedMessageData
- Exchange
- ExchangeRatePairs
- FigiInstrument
- FigiInstrumentNullable
- HoldingsStatus
- LoginRedirectURI
- ManualTrade
- ManualTradeAndImpact
- ManualTradeBalance
- ManualTradeForm
- ManualTradeFormWithOptions
- ManualTradeImpact
- ManualTradeSymbol
- Model400FailedRequestResponse
- Model401FailedRequestResponse
- Model402BrokerageAuthAlreadyDisabledException
- Model402BrokerageAuthDisabledResponse
- Model403FailedRequestResponse
- Model403FeatureNotEnabledResponse
- Model404FailedRequestResponse
- Model425FailedRequestResponse
- Model500UnexpectedExceptionResponse
- MonthlyDividends
- NetContributions
- NetDividend
- NotionalValue
- NotionalValueNullable
- OptionBrokerageSymbol
- OptionChainInner
- OptionChainInnerChainPerRootInner
- OptionChainInnerChainPerRootInnerChainPerStrikePriceInner
- OptionLeg
- OptionStrategy
- OptionStrategyLegsInner
- OptionsGetOptionStrategyRequest
- OptionsPlaceOptionStrategyRequest
- OptionsPosition
- OptionsSymbol
- OptionsSymbolNullable
- OrderTypeStrict
- PartnerData
- PastValue
- PerformanceCustom
- Position
- PositionSymbol
- RateOfReturnObject
- RateOfReturnResponse
- RecentOrdersResponse
- SecurityType
- SessionEvent
- SnapTradeHoldingsAccount
- SnapTradeHoldingsTotalValue
- SnapTradeLoginUserRequestBody
- SnapTradeRegisterUserRequestBody
- Status
- StrategyOrderRecord
- StrategyQuotes
- StrategyQuotesGreek
- SubPeriodReturnRate
- Symbol
- SymbolCurrency
- SymbolExchange
- SymbolNullable
- SymbolQuery
- SymbolsQuotesInner
- TimeInForceStrict
- TradingCancelUserAccountOrderRequest
- TransactionsStatus
- USExchange
- UnderlyingSymbol
- UnderlyingSymbolExchange
- UnderlyingSymbolType
- UniversalActivity
- UniversalActivityCurrency
- UniversalSymbol
- UserIDandSecret
- ValidatedTradeBody
Dependencies
- RestSharp - 106.13.0 or later
- Json.NET - 13.0.1 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
Author
This C# package is automatically generated by Konfig
| Product | Versions 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.
-
.NETStandard 2.0
- JsonSubTypes (>= 1.9.0)
- Newtonsoft.Json (>= 13.0.1)
- Polly (>= 7.2.3)
- RestSharp (>= 111.2.0)
- System.ComponentModel.Annotations (>= 5.0.0)
-
net5.0
- JsonSubTypes (>= 1.9.0)
- Newtonsoft.Json (>= 13.0.1)
- Polly (>= 7.2.3)
- RestSharp (>= 111.2.0)
- System.ComponentModel.Annotations (>= 5.0.0)
-
net7.0
- JsonSubTypes (>= 1.9.0)
- Newtonsoft.Json (>= 13.0.1)
- Polly (>= 7.2.3)
- RestSharp (>= 111.2.0)
- System.ComponentModel.Annotations (>= 5.0.0)
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 |
|---|---|---|
| 5.0.179 | 34 | 4/8/2026 |
| 5.0.178 | 32 | 4/8/2026 |
| 5.0.177 | 95 | 4/1/2026 |
| 5.0.176 | 86 | 3/31/2026 |
| 5.0.175 | 95 | 3/30/2026 |
| 5.0.174 | 87 | 3/30/2026 |
| 5.0.173 | 86 | 3/30/2026 |
| 5.0.172 | 1,354 | 3/10/2026 |
| 5.0.171 | 99 | 3/6/2026 |
| 5.0.170 | 94 | 3/6/2026 |
| 5.0.169 | 91 | 3/5/2026 |
| 5.0.168 | 107 | 3/3/2026 |
| 5.0.167 | 167 | 2/27/2026 |
| 5.0.166 | 92 | 2/25/2026 |
| 5.0.165 | 156 | 2/21/2026 |
| 5.0.164 | 140 | 2/14/2026 |
| 5.0.163 | 574 | 2/6/2026 |
| 5.0.162 | 115 | 2/5/2026 |
| 5.0.161 | 309 | 2/3/2026 |
| 5.0.61 | 5,551 | 12/6/2024 |
Loading failed
Minor update