Alpaca.Markets 6.1.6

.NET 6.0 .NET Standard 2.0 .NET Framework 4.6.2
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Alpaca.Markets --version 6.1.6
NuGet\Install-Package Alpaca.Markets -Version 6.1.6
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="Alpaca.Markets" Version="6.1.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Alpaca.Markets --version 6.1.6
#r "nuget: Alpaca.Markets, 6.1.6"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Alpaca.Markets as a Cake Addin
#addin nuget:?package=Alpaca.Markets&version=6.1.6

// Install Alpaca.Markets as a Cake Tool
#tool nuget:?package=Alpaca.Markets&version=6.1.6

Build Codacy Coverage

.NET SDK for Alpaca Markets API

This package contains C#/.NET SDK for Alpaca Trade API. See full online documentation here.

.NET Core Usage Example

  1. Create a new console application in a new, empty folder by running dotnet new console.
  2. Add a reference for Alpaca .NET SDK with dotnet add package Alpaca.Markets.
  3. Replace content of the auto-generated Programm.cs file with this code snippet:
using System;
using Alpaca.Markets;
using System.Threading.Tasks;

namespace AlpacaExample
{
    internal static class Program
    {
        private const String KEY_ID = "";

        private const String SECRET_KEY = "";

        public static async Task Main()
        {
            var client = Environments.Paper
                .GetAlpacaTradingClient(new SecretKey(KEY_ID, SECRET_KEY));

            var clock = await client.GetClockAsync();

            if (clock != null)
            {
                Console.WriteLine(
                    "Timestamp: {0}, NextOpen: {1}, NextClose: {2}",
                    clock.TimestampUtc, clock.NextOpenUtc, clock.NextCloseUtc);
            }
        }
    }
}
  1. Replace KEY_ID and SECRET_KEY values with your own data from the Alpaca dashboard.
  2. Run the sample application using dotnet run command and check the output. You should see information about the current market timestamp and the times that the market will open and close next.

See the UsageExamples project for near-to-real-world strategy implementation using this SDK and the Alpaca.Markets.Tests repository for SDK usage examples. The Wiki pages contain a lot of additional information about different aspects of this SDK (environments handling, authentication types, different order placement approaches, streaming client subscriptions handling, etc.).

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Alpaca.Markets:

Package Downloads
Alpaca.Markets.Extensions

C# SDK for Alpaca Trade API https://docs.alpaca.markets/

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Alpaca.Markets:

Repository Stars
alpacahq/alpaca-trade-api-csharp
C# SDK for Alpaca Trade API https://docs.alpaca.markets/
Version Downloads Last updated
7.0.0-alpha1 87 11/5/2022
6.1.7-beta1 34 11/21/2022
6.1.7-alpha1 45 11/8/2022
6.1.6 345 11/5/2022
6.1.5 1,333 9/26/2022
6.1.4 202 9/19/2022
6.1.3 530 9/11/2022
6.1.2 433 9/3/2022
6.1.1 315 8/30/2022
6.1.0 288 8/23/2022
6.1.0-beta1 183 8/7/2022
6.0.6 776 7/18/2022
6.0.5 897 6/22/2022
6.0.4 1,009 6/3/2022
6.0.4-beta2 78 6/1/2022
6.0.4-beta1 106 5/30/2022
6.0.3 658 5/29/2022
6.0.3-rc2 293 5/17/2022
6.0.3-rc1 217 4/27/2022
6.0.3-beta5 126 4/20/2022
6.0.3-beta4 161 4/9/2022
6.0.3-beta3 128 3/28/2022
6.0.3-beta2 143 3/21/2022
6.0.3-beta1 138 3/7/2022
6.0.3-alpha3 144 2/23/2022
6.0.3-alpha2 110 2/20/2022
6.0.3-alpha1 160 1/29/2022
5.4.0 76 11/26/2022
5.3.12 99 11/5/2022
5.3.10 161 9/26/2022
5.3.9 177 9/3/2022
5.3.8 180 8/30/2022
5.3.7 183 8/23/2022
5.3.6 188 8/11/2022
5.3.5 201 7/18/2022
5.3.4 364 6/22/2022
5.3.3 232 5/29/2022
5.3.2 708 5/8/2022
5.3.1 787 4/27/2022
5.3.0 659 4/22/2022
5.3.0-beta1 101 4/8/2022
5.3.0-alpha2 105 3/28/2022
5.3.0-alpha1 117 3/27/2022
5.2.18 256 5/17/2022
5.2.17 515 4/27/2022
5.2.16 647 4/8/2022
5.2.15 496 3/28/2022
5.2.14 481 3/21/2022
5.2.12 294 3/20/2022
5.2.11 450 3/12/2022
5.2.10 450 3/4/2022
5.2.9 850 2/25/2022
5.2.8 931 1/29/2022
5.2.7 1,635 12/31/2021
5.2.6 896 12/21/2021
5.2.5 340 12/20/2021
5.2.4 809 12/2/2021
5.2.3 687 11/13/2021
5.2.2 646 10/28/2021
5.2.1 732 10/20/2021
5.2.0 656 10/18/2021
4.1.24 1,341 6/22/2022
4.1.23 220 5/17/2022
4.1.22 331 4/27/2022
4.1.21 329 3/22/2022
4.1.20 230 3/20/2022
4.1.19 225 3/4/2022
4.1.18 208 12/20/2021
4.1.17 352 12/2/2021
4.1.16 5,404 10/18/2021
4.1.15 335 9/20/2021
4.1.14 316 8/28/2021
4.1.13 424 8/12/2021
4.1.12 320 8/4/2021
4.1.11 288 7/19/2021
4.1.10 359 6/20/2021
4.1.9 435 6/13/2021
4.1.8 593 5/31/2021
4.1.7 496 5/16/2021
4.1.6 620 4/30/2021
4.1.5 362 4/16/2021
4.1.4 530 3/31/2021
4.1.3 621 3/20/2021
4.1.2 586 3/18/2021
4.1.1 699 3/3/2021
4.1.0 6,971 2/24/2021

- Added optional `Currency` parameter for historical and latest stock data requests.
- Added the `MaintenanceMarginRequirement' property into the `IAsset` interface.