Alpaca.Markets 5.2.1

There is a newer prerelease version of this package available.
See the version list below for details.
Install-Package Alpaca.Markets -Version 5.2.1
dotnet add package Alpaca.Markets --version 5.2.1
<PackageReference Include="Alpaca.Markets" Version="5.2.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Alpaca.Markets --version 5.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Alpaca.Markets, 5.2.1"
#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=5.2.1

// Install Alpaca.Markets as a Cake Tool
#tool nuget:?package=Alpaca.Markets&version=5.2.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Build Codacy Dependabot

.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.).

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
6.0.1-alpha1 0 10/20/2021
6.0.0-alpha5 89 10/14/2021
6.0.0-alpha4 96 10/1/2021
6.0.0-alpha3 113 9/28/2021
6.0.0-alpha2 113 9/20/2021
6.0.0-alpha1 125 9/5/2021
5.2.1 0 10/20/2021
5.2.0 92 10/18/2021
5.1.2-beta2 104 10/8/2021
5.1.2-beta1 142 10/3/2021
5.1.1 329 9/20/2021
5.1.0 341 9/1/2021
5.1.0-rc2 71 8/29/2021
5.1.0-rc1 432 8/13/2021
5.1.0-beta3 95 8/4/2021
5.1.0-beta2 226 7/26/2021
5.1.0-beta1 69 7/21/2021
5.1.0-alpha3 123 7/4/2021
5.1.0-alpha2 232 6/16/2021
5.1.0-alpha1 100 6/9/2021
5.0.9 51 10/18/2021
5.0.8 139 9/20/2021
5.0.7 90 8/28/2021
5.0.6 301 8/14/2021
5.0.5 165 8/4/2021
5.0.4 252 7/19/2021
5.0.3 454 6/20/2021
5.0.3-rc3 90 6/14/2021
5.0.3-rc2 199 6/3/2021
5.0.3-rc1 101 5/26/2021
5.0.3-beta3 121 5/16/2021
5.0.3-beta2 147 5/8/2021
5.0.3-beta1 139 4/24/2021
5.0.3-alpha3 138 4/23/2021
5.0.3-alpha2 91 4/15/2021
5.0.3-alpha1 135 4/13/2021
5.0.2-alpha4 155 4/5/2021
5.0.2-alpha3 149 3/31/2021
5.0.2-alpha2 140 3/26/2021
5.0.2-alpha1 141 3/24/2021
5.0.1-alpha5 153 3/18/2021
5.0.1-alpha4 198 3/13/2021
5.0.1-alpha3 123 3/8/2021
5.0.1-alpha2 125 3/1/2021
5.0.1-alpha 171 2/26/2021
5.0.0-alpha6 171 2/24/2021
5.0.0-alpha5 109 2/19/2021
5.0.0-alpha4 167 2/15/2021
5.0.0-alpha3 117 2/11/2021
5.0.0-alpha2 190 1/29/2021
5.0.0-alpha1 177 1/4/2021
4.1.16 46 10/18/2021
4.1.15 134 9/20/2021
4.1.14 75 8/28/2021
4.1.13 107 8/12/2021
4.1.12 101 8/4/2021
4.1.11 77 7/19/2021
4.1.10 151 6/20/2021
4.1.9 143 6/13/2021
4.1.9-beta1 142 6/3/2021
4.1.8 227 5/31/2021
4.1.7 283 5/16/2021
4.1.6 403 4/30/2021
4.1.6-beta1 79 4/23/2021
4.1.5 182 4/16/2021
4.1.4 340 3/31/2021
4.1.4-beta 101 3/24/2021
4.1.3 352 3/20/2021
4.1.2 217 3/18/2021
4.1.2-beta 166 3/13/2021
4.1.2-alpha 111 3/8/2021
4.1.1 388 3/3/2021
4.1.1-beta2 99 3/1/2021
4.1.1-beta 122 2/26/2021
4.1.0 6,391 2/24/2021
4.0.15 74 7/19/2021
4.0.14 139 6/20/2021
4.0.13 100 6/12/2021
4.0.13-beta1 148 6/5/2021
4.0.12 114 5/28/2021
4.0.11 110 5/16/2021
4.0.10 99 4/30/2021
4.0.10-beta1 120 4/24/2021
4.0.9 102 4/16/2021
4.0.8 94 3/31/2021
4.0.8-beta 102 3/24/2021
4.0.7 105 3/20/2021
4.0.6 116 3/18/2021
4.0.6-beta 146 3/13/2021
4.0.6-alpha 112 3/8/2021
4.0.5 175 3/3/2021
4.0.5-beta2 99 3/1/2021
4.0.5-beta 118 2/26/2021
4.0.4 150 2/24/2021
4.0.3 1,023 2/11/2021
4.0.2 865 1/29/2021
4.0.2-beta 105 1/23/2021
4.0.1 902 1/3/2021
4.0.0 268 12/31/2020
4.0.0-beta1 253 12/26/2020
4.0.0-alpha1 154 12/26/2020
3.9.5 98 2/11/2021
3.9.4 154 1/3/2021
3.9.3 249 12/26/2020
3.9.2 246 12/18/2020
3.9.1 2,823 11/4/2020
3.9.0 726 10/26/2020
3.9.0-rc3 229 10/14/2020
3.9.0-rc2 304 10/10/2020
3.9.0-rc1 197 10/5/2020
3.9.0-beta3 267 9/28/2020
3.9.0-beta1 182 9/23/2020
3.9.0-alpha3 239 9/13/2020
3.9.0-alpha2 433 9/11/2020
3.9.0-alpha1 205 9/2/2020
3.8.6 175 12/26/2020
3.8.5 180 12/18/2020
3.8.4 222 11/4/2020
3.8.3 946 9/23/2020
3.8.2 229 9/21/2020
3.8.1 1,014 9/11/2020
3.8.0 648 8/31/2020
3.8.0-beta4 226 8/26/2020
3.8.0-beta3 225 8/7/2020
3.8.0-beta2 222 7/16/2020
3.8.0-beta1 211 7/7/2020
3.8.0-alpha4 229 6/24/2020
3.8.0-alpha3 257 6/15/2020
3.8.0-alpha2 249 6/14/2020
3.8.0-alpha1 283 6/6/2020
3.7.4 244 9/11/2020
3.7.3 1,849 7/7/2020
3.7.2 408 6/23/2020
3.7.1 539 6/12/2020
3.7.0 584 5/27/2020
3.7.0-rc1 320 5/23/2020
3.7.0-beta2 273 5/16/2020
3.7.0-beta1 218 5/11/2020
3.7.0-alpha2 226 5/6/2020
3.7.0-alpha1 235 4/29/2020
3.6.5 216 7/7/2020
3.6.4 275 5/23/2020
3.6.3 315 5/13/2020
3.6.2 400 4/24/2020
3.6.1 447 4/14/2020
3.6.0 301 4/7/2020
3.6.0-beta4 325 3/28/2020
3.6.0-beta3 340 3/23/2020
3.6.0-beta2 254 3/16/2020
3.6.0-beta1 275 3/11/2020
3.6.0-alpha2 291 2/27/2020
3.6.0-alpha1 283 2/9/2020
3.5.11 245 5/23/2020
3.5.10 227 5/13/2020
3.5.9 214 4/24/2020
3.5.8 214 4/14/2020
3.5.7 407 3/28/2020
3.5.6 351 3/20/2020
3.5.5 654 3/7/2020
3.5.4 256 3/5/2020
3.5.3 369 2/27/2020
3.5.2 460 2/9/2020
3.5.1 317 2/7/2020
3.5.0 337 1/28/2020
3.5.0-beta3 294 1/22/2020
3.5.0-beta2 416 1/18/2020
3.5.0-beta1 316 1/17/2020
3.5.0-alpha4 339 1/3/2020
3.5.0-alpha3 265 12/23/2019
3.5.0-alpha2 339 12/15/2019
3.5.0-alpha1 263 12/8/2019
3.4.6 253 2/7/2020
3.4.5 514 1/15/2020
3.4.4 446 1/3/2020
3.4.3 276 12/28/2019
3.4.2 270 12/27/2019
3.4.1 363 12/3/2019
3.4.0 286 12/1/2019
3.4.0-beta2 308 11/26/2019
3.4.0-beta 264 11/22/2019
3.4.0-alpha2 266 10/24/2019
3.4.0-alpha 263 10/21/2019
3.3.10 292 1/15/2020
3.3.9 355 1/3/2020
3.3.8 268 12/28/2019
3.3.7 288 12/27/2019
3.3.6 348 11/26/2019
3.3.5 267 11/22/2019
3.3.4 374 10/24/2019
3.3.3 387 10/3/2019
3.3.2 319 9/17/2019
3.3.1 313 9/11/2019
3.3.0 318 9/8/2019
3.3.0-beta 270 9/6/2019
3.3.0-alpha 291 8/28/2019
3.2.10 335 11/26/2019
3.2.9 264 11/22/2019
3.2.8 272 10/24/2019
3.2.7 292 10/3/2019
3.2.6 287 9/17/2019
3.2.5 314 9/8/2019
3.2.4 302 9/6/2019
3.2.3 300 9/4/2019
3.2.2 364 8/14/2019
3.2.1 344 8/7/2019
3.2.1-alpha 276 8/6/2019
3.2.0 334 8/1/2019
3.2.0-rc1 282 7/26/2019
3.2.0-beta2 291 7/18/2019
3.2.0-beta 312 7/11/2019
3.2.0-alpha 787 7/4/2019
3.1.5 305 8/14/2019
3.1.4 313 8/1/2019
3.1.3 309 7/26/2019
3.1.2 380 7/10/2019
3.1.1 318 7/8/2019
3.1.0 318 7/4/2019
3.1.0-alpha 303 7/1/2019
3.0.7 395 6/23/2019
3.0.5 338 6/20/2019
3.0.4 576 6/5/2019
3.0.3 373 5/17/2019
3.0.2 433 4/11/2019
3.0.1 383 4/5/2019
3.0.1-beta 319 3/28/2019
3.0.0-beta 314 3/26/2019
3.0.0-alpha 301 3/24/2019
2.1.4 447 2/27/2019
2.1.3 513 12/27/2018
2.1.2 447 12/23/2018
2.1.0 527 11/30/2018
2.1.0-beta 389 11/28/2018
2.0.0 477 11/19/2018
2.0.0-beta 414 11/6/2018
2.0.0-alpha 398 11/1/2018
1.2.6 367 2/27/2019
1.2.5 434 12/27/2018
1.2.4 434 12/23/2018
1.2.3 494 11/20/2018
1.2.2 476 11/6/2018
1.2.1 497 11/2/2018
1.2.0 482 10/31/2018
1.2.0-beta 448 9/14/2018
1.2.0-alpha 436 8/29/2018
1.1.2 548 8/21/2018
1.1.1 549 8/9/2018
1.1.0 843 8/3/2018
1.0.0 535 8/1/2018
1.0.0-beta 499 7/29/2018
1.0.0-alpha 532 7/17/2018

- Fixed problem with web socket message sending - allow only one message sending call at any moment.