Alpaca.Markets 5.2.4

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

// Install Alpaca.Markets as a Cake Tool
#tool nuget:?package=Alpaca.Markets&version=5.2.4
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 (2)

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

Package Downloads
Alpaca.Markets.Extensions

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

OoplesFinance.StockIndicators

Largest C# library of stock indicators and easiest to use with abilities such as making an indicator out of any other indicator or using any moving average with any indicator.

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.2-beta3 0 1/18/2022
6.0.2-beta1 77 1/3/2022
6.0.2-alpha4 88 12/21/2021
6.0.2-alpha3 36 12/20/2021
6.0.2-alpha2 61 11/30/2021
6.0.2-alpha1 53 11/27/2021
6.0.1-alpha4 182 11/16/2021
6.0.1-alpha3 267 10/31/2021
6.0.1-alpha2 88 10/29/2021
6.0.1-alpha1 145 10/20/2021
6.0.0-alpha5 145 10/14/2021
6.0.0-alpha4 141 10/1/2021
6.0.0-alpha3 157 9/28/2021
6.0.0-alpha2 180 9/20/2021
6.0.0-alpha1 183 9/5/2021
5.2.8-beta2 0 1/18/2022
5.2.8-alpha1 15 1/15/2022
5.2.7 223 12/31/2021
5.2.6 192 12/21/2021
5.2.5 70 12/20/2021
5.2.4 305 12/2/2021
5.2.3 400 11/13/2021
5.2.2 297 10/28/2021
5.2.1 349 10/20/2021
5.2.0 266 10/18/2021
5.1.2-beta2 159 10/8/2021
5.1.2-beta1 203 10/3/2021
5.1.1 489 9/20/2021
5.1.0 454 9/1/2021
5.1.0-rc2 105 8/29/2021
5.1.0-rc1 536 8/13/2021
5.1.0-beta3 124 8/4/2021
5.1.0-beta2 353 7/26/2021
5.1.0-beta1 103 7/21/2021
5.1.0-alpha3 151 7/4/2021
5.1.0-alpha2 274 6/16/2021
5.1.0-alpha1 153 6/9/2021
5.0.11 54 12/20/2021
5.0.10 105 12/2/2021
5.0.9 210 10/18/2021
5.0.8 209 9/20/2021
5.0.7 158 8/28/2021
5.0.6 431 8/14/2021
5.0.5 220 8/4/2021
5.0.4 311 7/19/2021
5.0.3 576 6/20/2021
5.0.3-rc3 122 6/14/2021
5.0.3-rc2 292 6/3/2021
5.0.3-rc1 130 5/26/2021
5.0.3-beta3 154 5/16/2021
5.0.3-beta2 208 5/8/2021
5.0.3-beta1 171 4/24/2021
5.0.3-alpha3 250 4/23/2021
5.0.3-alpha2 115 4/15/2021
5.0.3-alpha1 217 4/13/2021
5.0.2-alpha4 211 4/5/2021
5.0.2-alpha3 200 3/31/2021
5.0.2-alpha2 204 3/26/2021
5.0.2-alpha1 211 3/24/2021
5.0.1-alpha5 201 3/18/2021
5.0.1-alpha4 247 3/13/2021
5.0.1-alpha3 143 3/8/2021
5.0.1-alpha2 148 3/1/2021
5.0.1-alpha 229 2/26/2021
5.0.0-alpha6 247 2/24/2021
5.0.0-alpha5 128 2/19/2021
5.0.0-alpha4 221 2/15/2021
5.0.0-alpha3 136 2/11/2021
5.0.0-alpha2 251 1/29/2021
5.0.0-alpha1 237 1/4/2021
4.1.18 57 12/20/2021
4.1.17 107 12/2/2021
4.1.16 1,082 10/18/2021
4.1.15 199 9/20/2021
4.1.14 139 8/28/2021
4.1.13 220 8/12/2021
4.1.12 169 8/4/2021
4.1.11 145 7/19/2021
4.1.10 217 6/20/2021
4.1.9 241 6/13/2021
4.1.9-beta1 196 6/3/2021
4.1.8 379 5/31/2021
4.1.7 344 5/16/2021
4.1.6 464 4/30/2021
4.1.6-beta1 113 4/23/2021
4.1.5 225 4/16/2021
4.1.4 396 3/31/2021
4.1.4-beta 137 3/24/2021
4.1.3 428 3/20/2021
4.1.2 334 3/18/2021
4.1.2-beta 226 3/13/2021
4.1.2-alpha 139 3/8/2021
4.1.1 484 3/3/2021
4.1.1-beta2 146 3/1/2021
4.1.1-beta 152 2/26/2021
4.1.0 6,728 2/24/2021
4.0.15 141 7/19/2021
4.0.14 196 6/20/2021
4.0.13 190 6/12/2021
4.0.13-beta1 206 6/5/2021
4.0.12 166 5/28/2021
4.0.11 174 5/16/2021
4.0.10 171 4/30/2021
4.0.10-beta1 154 4/24/2021
4.0.9 168 4/16/2021
4.0.8 151 3/31/2021
4.0.8-beta 153 3/24/2021
4.0.7 167 3/20/2021
4.0.6 173 3/18/2021
4.0.6-beta 169 3/13/2021
4.0.6-alpha 140 3/8/2021
4.0.5 331 3/3/2021
4.0.5-beta2 135 3/1/2021
4.0.5-beta 146 2/26/2021
4.0.4 314 2/24/2021
4.0.3 1,116 2/11/2021
4.0.2 948 1/29/2021
4.0.2-beta 134 1/23/2021
4.0.1 1,072 1/3/2021
4.0.0 413 12/31/2020
4.0.0-beta1 295 12/26/2020
4.0.0-alpha1 183 12/26/2020
3.9.5 150 2/11/2021
3.9.4 205 1/3/2021
3.9.3 301 12/26/2020
3.9.2 324 12/18/2020
3.9.1 2,913 11/4/2020
3.9.0 1,086 10/26/2020
3.9.0-rc3 258 10/14/2020
3.9.0-rc2 337 10/10/2020
3.9.0-rc1 248 10/5/2020
3.9.0-beta3 294 9/28/2020
3.9.0-beta1 205 9/23/2020
3.9.0-alpha3 267 9/13/2020
3.9.0-alpha2 576 9/11/2020
3.9.0-alpha1 248 9/2/2020
3.8.6 227 12/26/2020
3.8.5 249 12/18/2020
3.8.4 280 11/4/2020
3.8.3 1,021 9/23/2020
3.8.2 278 9/21/2020
3.8.1 1,071 9/11/2020
3.8.0 721 8/31/2020
3.8.0-beta4 257 8/26/2020
3.8.0-beta3 251 8/7/2020
3.8.0-beta2 248 7/16/2020
3.8.0-beta1 232 7/7/2020
3.8.0-alpha4 260 6/24/2020
3.8.0-alpha3 279 6/15/2020
3.8.0-alpha2 262 6/14/2020
3.8.0-alpha1 300 6/6/2020
3.7.4 300 9/11/2020
3.7.3 2,016 7/7/2020
3.7.2 478 6/23/2020
3.7.1 584 6/12/2020
3.7.0 642 5/27/2020
3.7.0-rc1 347 5/23/2020
3.7.0-beta2 296 5/16/2020
3.7.0-beta1 259 5/11/2020
3.7.0-alpha2 259 5/6/2020
3.7.0-alpha1 284 4/29/2020
3.6.5 273 7/7/2020
3.6.4 329 5/23/2020
3.6.3 375 5/13/2020
3.6.2 453 4/24/2020
3.6.1 500 4/14/2020
3.6.0 360 4/7/2020
3.6.0-beta4 351 3/28/2020
3.6.0-beta3 371 3/23/2020
3.6.0-beta2 284 3/16/2020
3.6.0-beta1 292 3/11/2020
3.6.0-alpha2 312 2/27/2020
3.6.0-alpha1 306 2/9/2020
3.5.11 301 5/23/2020
3.5.10 293 5/13/2020
3.5.9 269 4/24/2020
3.5.8 278 4/14/2020
3.5.7 467 3/28/2020
3.5.6 403 3/20/2020
3.5.5 707 3/7/2020
3.5.4 310 3/5/2020
3.5.3 418 2/27/2020
3.5.2 505 2/9/2020
3.5.1 372 2/7/2020
3.5.0 430 1/28/2020
3.5.0-beta3 311 1/22/2020
3.5.0-beta2 437 1/18/2020
3.5.0-beta1 342 1/17/2020
3.5.0-alpha4 370 1/3/2020
3.5.0-alpha3 283 12/23/2019
3.5.0-alpha2 366 12/15/2019
3.5.0-alpha1 280 12/8/2019
3.4.6 320 2/7/2020
3.4.5 573 1/15/2020
3.4.4 512 1/3/2020
3.4.3 365 12/28/2019
3.4.2 322 12/27/2019
3.4.1 433 12/3/2019
3.4.0 350 12/1/2019
3.4.0-beta2 335 11/26/2019
3.4.0-beta 315 11/22/2019
3.4.0-alpha2 299 10/24/2019
3.4.0-alpha 301 10/21/2019
3.3.10 342 1/15/2020
3.3.9 428 1/3/2020
3.3.8 337 12/28/2019
3.3.7 348 12/27/2019
3.3.6 413 11/26/2019
3.3.5 350 11/22/2019
3.3.4 430 10/24/2019
3.3.3 439 10/3/2019
3.3.2 363 9/17/2019
3.3.1 369 9/11/2019
3.3.0 384 9/8/2019
3.3.0-beta 308 9/6/2019
3.3.0-alpha 340 8/28/2019
3.2.10 388 11/26/2019
3.2.9 359 11/22/2019
3.2.8 342 10/24/2019
3.2.7 348 10/3/2019
3.2.6 346 9/17/2019
3.2.5 371 9/8/2019
3.2.4 354 9/6/2019
3.2.3 365 9/4/2019
3.2.2 423 8/14/2019
3.2.1 429 8/7/2019
3.2.1-alpha 328 8/6/2019
3.2.0 390 8/1/2019
3.2.0-rc1 311 7/26/2019
3.2.0-beta2 319 7/18/2019
3.2.0-beta 388 7/11/2019
3.2.0-alpha 839 7/4/2019
3.1.5 364 8/14/2019
3.1.4 373 8/1/2019
3.1.3 366 7/26/2019
3.1.2 444 7/10/2019
3.1.1 388 7/8/2019
3.1.0 383 7/4/2019
3.1.0-alpha 344 7/1/2019
3.0.7 458 6/23/2019
3.0.5 396 6/20/2019
3.0.4 649 6/5/2019
3.0.3 438 5/17/2019
3.0.2 482 4/11/2019
3.0.1 442 4/5/2019
3.0.1-beta 352 3/28/2019
3.0.0-beta 342 3/26/2019
3.0.0-alpha 335 3/24/2019
2.1.4 505 2/27/2019
2.1.3 600 12/27/2018
2.1.2 505 12/23/2018
2.1.0 605 11/30/2018
2.1.0-beta 439 11/28/2018
2.0.0 527 11/19/2018
2.0.0-beta 453 11/6/2018
2.0.0-alpha 436 11/1/2018
1.2.6 422 2/27/2019
1.2.5 507 12/27/2018
1.2.4 486 12/23/2018
1.2.3 553 11/20/2018
1.2.2 527 11/6/2018
1.2.1 573 11/2/2018
1.2.0 548 10/31/2018
1.2.0-beta 484 9/14/2018
1.2.0-alpha 464 8/29/2018
1.1.2 597 8/21/2018
1.1.1 617 8/9/2018
1.1.0 905 8/3/2018
1.0.0 606 8/1/2018
1.0.0-beta 541 7/29/2018
1.0.0-alpha 597 7/17/2018

- Added the `IAlpacaDataSubscription.OnSubscribedChanged` event for clients who want to track subscription changes events.
- Added the `OnWarning` event into the streaming clients, all non-critical errors reported now via this new event.