SnapTrade.Net 5.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SnapTrade.Net --version 5.0.0
NuGet\Install-Package SnapTrade.Net -Version 5.0.0
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.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SnapTrade.Net --version 5.0.0
#r "nuget: SnapTrade.Net, 5.0.0"
#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.0

// Install SnapTrade.Net as a Cake Tool
#tool nuget:?package=SnapTrade.Net&version=5.0.0

SnapTrade.Net - C#

NuGet More Info

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:

  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 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 seperated 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} Return details of a specific investment account
AccountInformationApi GetUserAccountOrders GET /accounts/{accountId}/orders List account orders
AccountInformationApi GetUserAccountPositions GET /accounts/{accountId}/positions List account positions
AccountInformationApi GetUserHoldings GET /accounts/{accountId}/holdings List balances, positions and orders for the specified account
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 SnapTrade user
AuthenticationApi GetUserJWT GET /snapTrade/encryptedJWT Generate encrypted JWT token
AuthenticationApi ListSnapTradeUsers GET /snapTrade/listUsers List SnapTrade users
AuthenticationApi LoginSnapTradeUser POST /snapTrade/login Login user & generate connection link
AuthenticationApi RegisterSnapTradeUser POST /snapTrade/registerUser Create SnapTrade user
ConnectionsApi DetailBrokerageAuthorization GET /authorizations/{authorizationId} Get brokerage authorization details
ConnectionsApi ListBrokerageAuthorizations GET /authorizations List all brokerage authorizations for the user
ConnectionsApi RemoveBrokerageAuthorization DELETE /authorizations/{authorizationId} Delete brokerage authorization
ConnectionsApi SessionEvents GET /sessionEvents List all session events for the partner
ErrorLogsApi ListUserErrors GET /snapTrade/listUserErrors Retrieve error logs on behalf of your SnapTrade users
OptionsApi GetOptionStrategy POST /accounts/{accountId}/optionStrategy Creates an option strategy object that will be used to place an option strategy order
OptionsApi GetOptionsChain GET /accounts/{accountId}/optionsChain Get the options chain
OptionsApi GetOptionsStrategyQuote GET /accounts/{accountId}/optionStrategy/{optionStrategyId} Get latest market data of option strategy
OptionsApi ListOptionHoldings GET /accounts/{accountId}/options Get the options holdings in the account
OptionsApi PlaceOptionStrategy POST /accounts/{accountId}/optionStrategy/{optionStrategyId}/execute Place an option strategy order on the brokerage
ReferenceDataApi GetCurrencyExchangeRatePair GET /currencies/rates/{currencyPair} Return the 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 List exchanges
ReferenceDataApi GetSymbols POST /symbols Search for symbols
ReferenceDataApi GetSymbolsByTicker GET /symbols/{query} Get details of a symbol by the ticker or the universal_symbol_id
ReferenceDataApi ListAllBrokerageAuthorizationType GET /brokerageAuthorizationTypes List of all brokerage authorization types
ReferenceDataApi ListAllBrokerages GET /brokerages List brokerages
ReferenceDataApi ListAllCurrencies GET /currencies List currencies
ReferenceDataApi ListAllCurrenciesRates GET /currencies/rates List 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 impact of trades on account.
TradingApi GetUserAccountQuotes GET /accounts/{accountId}/quotes Get symbol quotes
TradingApi PlaceForceOrder POST /trade/place Place a trade with NO validation.
TradingApi PlaceOCOOrder POST /trade/oco Place a OCO (One Cancels Other) order
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

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. 
.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
5.0.15 141 4/18/2024
5.0.14 74 4/12/2024
5.0.13 304 4/5/2024
5.0.12 514 3/14/2024
5.0.11 77 3/12/2024
5.0.10 94 3/5/2024
5.0.9 374 2/23/2024
5.0.8 99 2/21/2024
5.0.7 78 2/16/2024
5.0.6 99 2/14/2024
5.0.5 83 2/9/2024
5.0.4 75 2/2/2024
5.0.3 341 2/1/2024
5.0.2 85 1/29/2024
5.0.1 80 1/26/2024
5.0.0 195 1/24/2024
4.0.12 804 1/17/2024
4.0.11 88 1/16/2024
4.0.10 192 1/11/2024
4.0.9 122 1/3/2024
4.0.8 415 12/12/2023
4.0.7 164 12/4/2023
4.0.6 119 11/30/2023
4.0.5 111 11/15/2023
4.0.4 116 11/8/2023
4.0.3 123 11/1/2023
4.0.2 151 10/18/2023
4.0.1 149 10/13/2023
4.0.0 151 10/7/2023
3.33.2 206 9/26/2023
3.33.1 160 9/19/2023
3.33.0 235 9/2/2023
3.32.1 153 8/31/2023
3.32.0 155 8/16/2023
3.31.0 169 8/14/2023
3.30.0 204 8/11/2023
3.29.0 169 8/9/2023
3.28.0 178 8/9/2023
3.27.0 177 8/4/2023
3.26.0 160 8/2/2023
3.25.0 194 7/31/2023
3.24.0 168 7/27/2023
3.23.0 180 7/27/2023
3.22.0 177 7/18/2023
3.21.0 172 6/22/2023
3.20.0 172 6/13/2023
3.19.0 173 6/7/2023
3.18.0 199 6/5/2023
3.17.0 249 6/1/2023
3.15.0 165 5/29/2023
3.14.0 170 5/26/2023
3.13.0 3,535 5/18/2023
3.12.0 156 5/16/2023
3.11.0 163 5/15/2023
3.10.0 190 5/9/2023
3.9.0 475 4/28/2023
3.8.0 204 4/28/2023
3.7.0 372 4/23/2023
3.6.0 171 4/21/2023
3.5.0 198 4/20/2023
3.4.0 188 4/18/2023
3.3.0 197 4/17/2023
3.2.0 216 4/15/2023
3.1.0 202 4/15/2023
3.0.0 213 4/12/2023
2.0.0 218 4/11/2023
1.3.0 234 4/6/2023
1.2.0 218 4/6/2023
1.1.0 243 4/6/2023
1.0.0 237 4/6/2023

Minor update