GW2SDK 2.9.0-preview.1
dotnet add package GW2SDK --version 2.9.0-preview.1
NuGet\Install-Package GW2SDK -Version 2.9.0-preview.1
<PackageReference Include="GW2SDK" Version="2.9.0-preview.1" />
<PackageVersion Include="GW2SDK" Version="2.9.0-preview.1" />
<PackageReference Include="GW2SDK" />
paket add GW2SDK --version 2.9.0-preview.1
#r "nuget: GW2SDK, 2.9.0-preview.1"
#:package GW2SDK@2.9.0-preview.1
#addin nuget:?package=GW2SDK&version=2.9.0-preview.1&prerelease
#tool nuget:?package=GW2SDK&version=2.9.0-preview.1&prerelease
About
GW2SDK provides classes for interacting with the Guild Wars 2 API and game client. This package enables you to fetch information about the game, the player's account, PvP seasons, WvW matches and the in-game economy. It also provides realtime information from the game client such as the player's current character and the current map.
Key features
- Gw2Clientprovides access to the Guild Wars 2 API
- GameLinkprovides realtime information from the game client (Windows only)
How to use Gw2Client
API access using Gw2Client:
using System;
using System.Net.Http;
using System.Threading.Tasks;
using GuildWars2;
using GuildWars2.Commerce.Prices;
using GuildWars2.Items;
namespace Gw2ClientProgram;
internal class Program
{
    public static async Task Main(string[] args)
    {
        // Create an instance of the Gw2Client, which depends on HttpClient
        using var httpClient = new HttpClient();
        var gw2 = new Gw2Client(httpClient);
        // Fetch the current prices of all items
        await foreach (var itemPrice in gw2.Commerce.GetItemPricesBulk().ValueOnly())
        {
            // The item price contains the item's ID, which can be used to fetch
            // the item's name
            var item = await gw2.Items.GetItemById(itemPrice.Id).ValueOnly();
            // Print the item's name and its current highest buyer and lowest seller
            PrintItem(item, itemPrice);
        }
    }
    private static void PrintItem(Item item, ItemPrice price)
    {
        Console.WriteLine($"{"Item",-15}: {item.Name}");
        Console.WriteLine($"{"Highest buyer",-15}: {price.BestBid}");
        Console.WriteLine($"{"Lowest seller",-15}: {price.BestAsk}");
        Console.WriteLine($"{"Bid-ask spread",-15}: {price.BidAskSpread}");
        Console.WriteLine();
    }
}
How to use GameLink
Game client access using GameLink:
(This example also requires the System.Reactive package to be installed.)
using System;
using System.Threading.Tasks;
using GuildWars2;
using GuildWars2.Mumble;
namespace GameLinkProgram;
internal class Program
{
    public static async Task Main(string[] args)
    {
        if (!GameLink.IsSupported())
        {
            Console.WriteLine("GameLink is only supported on Windows!");
            return;
        }
        // Choose an interval to indicate how often you want to
        //   receive fresh data from the game.
        // For example, at most once every second.
        // Default: no limit, every change in the game state
        //   will be available immediately.
        var refreshInterval = TimeSpan.FromSeconds(1);
        // Open the game link with the chosen refresh interval.
        // GameLink implements IDiposable and IAsyncDisposable,
        //  make sure it is disposed one way or another,
        //  e.g. by 'using' or 'await using'.
        await using var gameLink = GameLink.Open(refreshInterval);
        Console.WriteLine(
            "GameLink is starting! (Ensure the game is running"
            + " and that you are loaded into a map.)"
        );
        // Subscribe to the game link to start receiving game state updates.
        var subscription = gameLink.Subscribe(
            gameTick =>
            {
                // Each 'tick' contains information about the player's character
                // and actions, among other things.
                var player = gameTick.GetIdentity();
                // The identity can be missing due to JSON errors,
                // always check for null.
                if (player is not null)
                {
                    Console.WriteLine($"{player.Name} is ready to go!");
                    Console.WriteLine($"Race              : {
                        player.Race
                    }");
                    Console.WriteLine($"Profession        : {
                        player.Profession
                    }");
                    Console.WriteLine($"Specialization ID : {
                        player.SpecializationId
                    }");
                    Console.WriteLine($"Squad leader      : {
                        player.Commander
                    }");
                    Console.WriteLine($"In combat         : {
                        gameTick.Context.UiState.HasFlag(UiState.IsInCombat)
                    }");
                    Console.WriteLine($"Current mount     : {
                        gameTick.Context.Mount
                    }");
                    Console.WriteLine($"Tick              : {
                        gameTick.UiTick
                    }");
                }
                Console.WriteLine();
            }
        );
        // Wait for the user to press Enter.
        Console.ReadLine();
        subscription.Dispose();
    }
}
Additional documentation
Feedback & contributing
GW2SDK is released as open source under the MIT license. You are welcome to create an issue if you find something is missing or broken, or a discussion for other feedback, questions or ideas. Check out the GitHub page to find more ways to contribute.
| Product | Versions Compatible and additional computed target framework versions. | 
|---|---|
| .NET | net5.0 was computed. 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 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 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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 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. | 
- 
                                                    .NETFramework 4.6.2- Microsoft.Bcl.HashCode (>= 6.0.0)
- System.Runtime.InteropServices.RuntimeInformation (>= 4.3.0)
- System.Text.Json (>= 6.0.11)
 
- 
                                                    .NETStandard 2.0- Microsoft.Bcl.HashCode (>= 6.0.0)
- System.Text.Json (>= 6.0.11)
 
- 
                                                    net10.0- No dependencies.
 
- 
                                                    net8.0- No dependencies.
 
- 
                                                    net9.0- No dependencies.
 
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | 
|---|---|---|
| 2.9.0-preview.1 | 0 | 10/18/2025 | 
| 2.9.0-preview.0.2 | 0 | 9/7/2025 | 
| 2.8.1 | 0 | 10/18/2025 | 
| 2.8.0 | 0 | 9/7/2025 | 
| 2.7.0 | 0 | 8/10/2025 | 
| 2.6.0 | 0 | 7/29/2025 | 
| 2.5.2 | 0 | 6/23/2025 | 
| 2.5.1 | 0 | 6/7/2025 | 
| 2.5.0 | 0 | 6/7/2025 | 
| 2.4.1 | 0 | 6/7/2025 | 
| 2.4.0 | 0 | 5/23/2025 | 
| 2.3.2 | 0 | 4/18/2025 | 
| 2.3.1 | 0 | 4/13/2025 | 
| 2.3.0 | 0 | 2/22/2025 | 
| 2.2.1 | 0 | 2/11/2025 | 
| 2.2.0 | 0 | 1/27/2025 | 
| 2.1.0 | 0 | 12/29/2024 | 
| 2.0.0 | 0 | 12/8/2024 | 
| 1.4.1 | 0 | 11/14/2024 | 
| 1.4.0 | 0 | 11/5/2024 | 
| 1.3.0 | 0 | 11/3/2024 | 
| 1.2.0 | 0 | 10/23/2024 | 
| 1.1.2 | 0 | 10/13/2024 | 
| 1.1.1 | 0 | 10/11/2024 | 
| 1.1.0 | 0 | 10/5/2024 | 
| 1.0.1 | 1 | 7/7/2024 | 
| 1.0.0 | 2 | 5/20/2024 | 
| 1.0.0-rc.3 | 2 | 5/17/2024 | 
| 1.0.0-rc.2 | 2 | 4/6/2024 | 
| 1.0.0-rc.1 | 2 | 3/30/2024 | 
| 1.0.0-preview.15 | 2 | 3/25/2024 | 
| 1.0.0-preview.14 | 2 | 3/25/2024 | 
| 1.0.0-preview.13 | 2 | 2/18/2024 | 
| 1.0.0-preview.12 | 2 | 12/11/2023 | 
| 1.0.0-preview.11 | 2 | 12/5/2023 | 
| 1.0.0-preview.10 | 2 | 11/12/2023 | 
| 1.0.0-preview.9 | 2 | 11/5/2023 | 
| 1.0.0-preview.8 | 2 | 11/4/2023 | 
| 1.0.0-preview.7 | 2 | 10/30/2023 | 
| 1.0.0-preview.6 | 2 | 10/29/2023 | 
| 1.0.0-preview.5 | 3 | 10/28/2023 | 
| 1.0.0-preview.4 | 2 | 10/23/2023 | 
| 1.0.0-preview.3 | 3 | 10/21/2023 | 
| 1.0.0-preview.2 | 4 | 10/18/2023 | 
| 1.0.0-preview.1 | 2 | 10/15/2023 |