SnapTrade.Net
5.0.39
.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.39
NuGet\Install-Package SnapTrade.Net -Version 5.0.39
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.39" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SnapTrade.Net --version 5.0.39
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SnapTrade.Net, 5.0.39"
#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 SnapTrade.Net as a Cake Addin #addin nuget:?package=SnapTrade.Net&version=5.0.39 // Install SnapTrade.Net as a Cake Tool #tool nuget:?package=SnapTrade.Net&version=5.0.39
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 | 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 | Login user & generate connection link |
AuthenticationApi | RegisterSnapTradeUser | POST /snapTrade/registerUser | Register user |
AuthenticationApi | ResetSnapTradeUserSecret | POST /snapTrade/resetUserSecret | Rotate user secret |
ConnectionsApi | DetailBrokerageAuthorization | GET /authorizations/{authorizationId} | Get brokerage authorization details |
ConnectionsApi | DisableBrokerageAuthorization | POST /authorizations/{authorizationId}/disable | Manually disable a connection for testing |
ConnectionsApi | ListBrokerageAuthorizations | GET /authorizations | List all brokerage authorizations for the User |
ConnectionsApi | RefreshBrokerageAuthorization | POST /authorizations/{authorizationId}/refresh | Refresh holdings for a connection |
ConnectionsApi | RemoveBrokerageAuthorization | DELETE /authorizations/{authorizationId} | Delete brokerage authorization |
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 metadata related to Snaptrade partner |
ReferenceDataApi | GetSecurityTypes | GET /securityTypes | List of all security types |
ReferenceDataApi | GetStockExchanges | GET /exchanges | Get exchanges |
ReferenceDataApi | GetSymbols | POST /symbols | Search for symbols |
ReferenceDataApi | GetSymbolsByTicker | GET /symbols/{query} | Get details of a symbol |
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 for symbols available in an account |
TradingApi | CancelUserAccountOrder | POST /accounts/{accountId}/orders/cancel | Cancel open order in account |
TradingApi | GetOrderImpact | POST /trade/impact | Check the impact of a trade on an account |
TradingApi | GetUserAccountQuotes | GET /accounts/{accountId}/quotes | Get symbol quotes |
TradingApi | PlaceForceOrder | POST /trade/place | Place a trade with NO validation. |
TradingApi | PlaceOrder | POST /trade/{tradeId} | Place 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
- 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
- ManualTradeSymbol
- Model400FailedRequestResponse
- Model401FailedRequestResponse
- Model402BrokerageAuthAlreadyDisabledException
- Model402BrokerageAuthDisabledResponse
- Model403FailedRequestResponse
- Model403FeatureNotEnabledResponse
- Model404FailedRequestResponse
- Model500UnexpectedExceptionResponse
- MonthlyDividends
- NetContributions
- NetDividend
- NotionalValue
- NotionalValueNullable
- OptionBrokerageSymbol
- OptionChainInner
- OptionChainInnerChainPerRootInner
- OptionChainInnerChainPerRootInnerChainPerStrikePriceInner
- OptionLeg
- OptionStrategy
- OptionStrategyLegsInner
- OptionsGetOptionStrategyRequest
- OptionsPlaceOptionStrategyRequest
- OptionsPosition
- OptionsSymbol
- OptionsSymbolNullable
- OrderTypeStrict
- PartnerData
- PastValue
- PerformanceCustom
- Position
- PositionSymbol
- 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. |
.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.84 | 193 | 3/6/2025 |
5.0.83 | 205 | 3/4/2025 |
5.0.82 | 195 | 3/4/2025 |
5.0.81 | 195 | 3/4/2025 |
5.0.80 | 95 | 3/3/2025 |
5.0.79 | 140 | 2/13/2025 |
5.0.78 | 99 | 2/10/2025 |
5.0.77 | 81 | 2/6/2025 |
5.0.76 | 91 | 2/3/2025 |
5.0.73 | 118 | 1/21/2025 |
5.0.72 | 83 | 1/14/2025 |
5.0.71 | 82 | 1/13/2025 |
5.0.70 | 92 | 1/10/2025 |
5.0.69 | 86 | 1/8/2025 |
5.0.68 | 91 | 1/7/2025 |
5.0.66 | 194 | 1/6/2025 |
5.0.61 | 693 | 12/6/2024 |
5.0.60 | 106 | 11/22/2024 |
5.0.59 | 117 | 11/21/2024 |
5.0.58 | 117 | 11/15/2024 |
5.0.57 | 99 | 11/15/2024 |
5.0.56 | 96 | 11/14/2024 |
5.0.55 | 105 | 11/7/2024 |
5.0.54 | 96 | 11/7/2024 |
5.0.53 | 112 | 10/30/2024 |
5.0.52 | 95 | 10/29/2024 |
5.0.51 | 95 | 10/28/2024 |
5.0.50 | 100 | 10/7/2024 |
5.0.49 | 99 | 10/2/2024 |
5.0.48 | 106 | 9/25/2024 |
5.0.47 | 113 | 9/21/2024 |
5.0.46 | 157 | 9/9/2024 |
5.0.45 | 121 | 9/5/2024 |
5.0.44 | 112 | 9/5/2024 |
5.0.43 | 95 | 9/3/2024 |
5.0.42 | 136 | 8/23/2024 |
5.0.41 | 141 | 8/22/2024 |
5.0.40 | 115 | 8/21/2024 |
5.0.39 | 117 | 8/21/2024 |
5.0.38 | 126 | 8/20/2024 |
5.0.37 | 128 | 8/19/2024 |
5.0.36 | 137 | 8/16/2024 |
5.0.35 | 123 | 8/15/2024 |
5.0.34 | 133 | 8/14/2024 |
5.0.33 | 85 | 8/2/2024 |
5.0.32 | 93 | 8/1/2024 |
5.0.31 | 116 | 7/16/2024 |
5.0.30 | 108 | 7/12/2024 |
5.0.29 | 124 | 6/28/2024 |
5.0.28 | 116 | 6/27/2024 |
5.0.27 | 107 | 6/26/2024 |
5.0.26 | 132 | 6/20/2024 |
5.0.25 | 506 | 6/14/2024 |
5.0.24 | 107 | 6/11/2024 |
5.0.23 | 113 | 6/5/2024 |
5.0.22 | 104 | 6/3/2024 |
5.0.21 | 132 | 5/24/2024 |
5.0.20 | 1,587 | 5/21/2024 |
5.0.19 | 25,132 | 5/10/2024 |
5.0.18 | 115 | 5/8/2024 |
5.0.17 | 99 | 5/3/2024 |
5.0.16 | 84 | 5/3/2024 |
5.0.15 | 270 | 4/18/2024 |
5.0.14 | 129 | 4/12/2024 |
5.0.13 | 345 | 4/5/2024 |
5.0.12 | 1,684 | 3/14/2024 |
5.0.11 | 114 | 3/12/2024 |
5.0.10 | 121 | 3/5/2024 |
5.0.9 | 402 | 2/23/2024 |
5.0.8 | 139 | 2/21/2024 |
5.0.7 | 119 | 2/16/2024 |
5.0.6 | 138 | 2/14/2024 |
5.0.5 | 131 | 2/9/2024 |
5.0.4 | 112 | 2/2/2024 |
5.0.3 | 366 | 2/1/2024 |
5.0.2 | 123 | 1/29/2024 |
5.0.1 | 118 | 1/26/2024 |
5.0.0 | 407 | 1/24/2024 |
4.0.12 | 843 | 1/17/2024 |
4.0.11 | 122 | 1/16/2024 |
4.0.10 | 244 | 1/11/2024 |
4.0.9 | 161 | 1/3/2024 |
4.0.8 | 450 | 12/12/2023 |
4.0.7 | 197 | 12/4/2023 |
4.0.6 | 157 | 11/30/2023 |
4.0.5 | 148 | 11/15/2023 |
4.0.4 | 152 | 11/8/2023 |
4.0.3 | 157 | 11/1/2023 |
4.0.2 | 186 | 10/18/2023 |
4.0.1 | 197 | 10/13/2023 |
4.0.0 | 187 | 10/7/2023 |
3.33.2 | 241 | 9/26/2023 |
3.33.1 | 196 | 9/19/2023 |
3.33.0 | 2,708 | 9/2/2023 |
3.32.1 | 191 | 8/31/2023 |
3.32.0 | 188 | 8/16/2023 |
3.31.0 | 204 | 8/14/2023 |
3.30.0 | 245 | 8/11/2023 |
3.29.0 | 209 | 8/9/2023 |
3.28.0 | 212 | 8/9/2023 |
3.27.0 | 214 | 8/4/2023 |
3.26.0 | 195 | 8/2/2023 |
3.25.0 | 234 | 7/31/2023 |
3.24.0 | 205 | 7/27/2023 |
3.23.0 | 218 | 7/27/2023 |
3.22.0 | 215 | 7/18/2023 |
3.21.0 | 195 | 6/22/2023 |
3.20.0 | 211 | 6/13/2023 |
3.19.0 | 198 | 6/7/2023 |
3.18.0 | 239 | 6/5/2023 |
3.17.0 | 295 | 6/1/2023 |
3.15.0 | 211 | 5/29/2023 |
3.14.0 | 206 | 5/26/2023 |
3.13.0 | 4,086 | 5/18/2023 |
3.12.0 | 193 | 5/16/2023 |
3.11.0 | 205 | 5/15/2023 |
3.10.0 | 232 | 5/9/2023 |
3.9.0 | 515 | 4/28/2023 |
3.8.0 | 244 | 4/28/2023 |
3.7.0 | 417 | 4/23/2023 |
3.6.0 | 210 | 4/21/2023 |
3.5.0 | 235 | 4/20/2023 |
3.4.0 | 228 | 4/18/2023 |
3.3.0 | 239 | 4/17/2023 |
3.2.0 | 254 | 4/15/2023 |
3.1.0 | 240 | 4/15/2023 |
3.0.0 | 256 | 4/12/2023 |
2.0.0 | 265 | 4/11/2023 |
1.3.0 | 280 | 4/6/2023 |
1.2.0 | 264 | 4/6/2023 |
1.1.0 | 285 | 4/6/2023 |
1.0.0 | 283 | 4/6/2023 |
Minor update