Alpaca.Markets.Extensions 7.1.0-beta1

Suggested Alternatives

Alpaca.Markets.Extensions 7.1.0

This is a prerelease version of Alpaca.Markets.Extensions.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Alpaca.Markets.Extensions --version 7.1.0-beta1                
NuGet\Install-Package Alpaca.Markets.Extensions -Version 7.1.0-beta1                
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.Extensions" Version="7.1.0-beta1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Alpaca.Markets.Extensions --version 7.1.0-beta1                
#r "nuget: Alpaca.Markets.Extensions, 7.1.0-beta1"                
#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 Alpaca.Markets.Extensions as a Cake Addin
#addin nuget:?package=Alpaca.Markets.Extensions&version=7.1.0-beta1&prerelease

// Install Alpaca.Markets.Extensions as a Cake Tool
#tool nuget:?package=Alpaca.Markets.Extensions&version=7.1.0-beta1&prerelease                

Contributors Codacy Coverage PVS-Studio Sponsors

.NET SDK for Alpaca Markets API

This package contains helper extensions methods for the 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.).

Contributors

Thanks a lot for all contributors. See the full list of project supporters in the CONTRIBUTORS file.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 was computed.  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 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  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 (1)

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

Package Downloads
Cryptohaus.Infrastructure

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

- Added factory methods for creating the strongly typed `IAlpacaOptionsDataClient` instance in dependency injection environments.
- Added the new extension method `ListOptionContractsAsAsyncEnumerable` for the `IAlpacaTradingClient` interface.