Watchlog 0.1.0

dotnet add package Watchlog --version 0.1.0
                    
NuGet\Install-Package Watchlog -Version 0.1.0
                    
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="Watchlog" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Watchlog" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Watchlog" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Watchlog --version 0.1.0
                    
#r "nuget: Watchlog, 0.1.0"
                    
#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.
#:package Watchlog@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Watchlog&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Watchlog&version=0.1.0
                    
Install as a Cake Tool

Watchlog .NET SDK

The official .NET SDK for the Watchlog watch price tracking API.

Track watch prices, by reference number or single listing, with a scheduled watchlist, price history and alerts.

The SDK exposes 9 typed async methods, one per documented endpoint (with required properties checked at compile time), plus ClearTargetPriceAsync and a generic RequestAsync.

Requirements

  • .NET 8 or newer

Installation

dotnet add package Watchlog

Get your API key

Sign up for Watchlog or sign in, then copy your API key from the dashboard. new WatchlogClient() reads the WATCHLOG_API_KEY environment variable.

Quick start

using Watchlog;

using var client = new WatchlogClient();
var response = await client.SearchWatchesAsync(new SearchWatchesParams { Query = "submariner" });
Console.WriteLine(response.Json);

Parameter classes mirror the API reference. Use response.Deserialize<MyType>() to map the JSON onto your own types.

HTTP methods

Each method uses the HTTP verb of its endpoint. GET and DELETE send parameters in the query string; POST and PATCH send them as a JSON body, except wait on /products/{id}/check, which stays in the query string. Null values are never sent: to remove a product's target price, call ClearTargetPriceAsync(id), which sends {"target_price": null}.

Any endpoint

var response = await client.RequestAsync("GET", "/account");

Errors

try
{
    await client.SearchWatchesAsync(new SearchWatchesParams { Query = "submariner" });
}
catch (WatchlogApiException exception)
{
    Console.Error.WriteLine($"{exception.StatusCode} {exception.ErrorCode}: {exception.Message}");
}

ErrorCode is the API's error.code (such as insufficient_credits, product_limit or not_found), or null when the body has none.

Exception When
WatchlogConfigurationException Missing API key, invalid options or unsupported method.
WatchlogSerializationException A required parameter is missing or a value can't be sent.
WatchlogTransportException Network failure or timeout.
WatchlogApiException Non-2xx status (StatusCode, ErrorMessage, ErrorCode, ResponseBody, RawResponse).
WatchlogResponseDecodingException A success response could not be decoded.

All of them derive from WatchlogException. Caller cancellation surfaces as OperationCanceledException.

Retries

Requests are retried up to 3 times after a network error, a 408, 500, 502, 503 or 504. Other statuses, such as 400, 401, 402, 404 or 429, and client-side timeouts are not retried: the API's rate limits last until the hour (or the day) is over, and on the free plan every retry would count as a request. The delay starts at 1 second and grows 1.5× per retry (capped at 30 seconds); a Retry-After header wins.

using var client = new WatchlogClient(new WatchlogClientOptions { MaxRetries = 5, RetryDelay = TimeSpan.FromMilliseconds(500) });
await client.SearchWatchesAsync(new SearchWatchesParams { Query = "submariner" }, new RequestOptions { MaxRetries = 0 }); // one request without retries

Batch requests

BatchAsync runs a function per item with at most 10 in flight (concurrency) and returns one BatchResult per item, in input order. A failing item never stops the others.

string[] inputs = { "submariner", "speedmaster", "royal oak" };
var results = await client.BatchAsync(inputs, (value, ct) =>
    client.SearchWatchesAsync(new SearchWatchesParams { Query = value }, cancellationToken: ct), concurrency: 5);
foreach (var result in results)
{
    if (result.Ok)
    {
        Console.WriteLine(result.Value!.Json);
    }
    else
    {
        Console.Error.WriteLine($"{inputs[result.Index]}: {result.Error!.Message}");
    }
}
Constant Default Description
WatchlogClient.DefaultConcurrency 10 Tasks run at the same time by batch
WatchlogClient.DefaultTimeout TimeSpan.FromSeconds(120) Request timeout
WatchlogClient.MaxRetries 3 Retry attempts after a network error, a 408/5xx
WatchlogClient.RetryBackoffFactor 1.5 Exponential backoff multiplier
WatchlogClient.DefaultRetryDelay TimeSpan.FromSeconds(1) Delay before the first retry

Configuration

using var client = new WatchlogClient(new WatchlogClientOptions
{
    ApiKey = Environment.GetEnvironmentVariable("WATCHLOG_API_KEY"),
    Timeout = TimeSpan.FromSeconds(60), // default 120 s
    HttpClient = myHttpClient,           // optional, you keep ownership
});

Endpoints

9 methods, generated from the OpenAPI document, plus ClearTargetPriceAsync.

Method HTTP Description
CheckProductAsync POST /products/{id}/check Asks for a check right away (1 credit), at most once per 5 minutes; earlier calls return the product unchanged. A paused product has to be…
ClearTargetPriceAsync PATCH /products/{id} Removes the product's target price (sends {"target_price": null}).
DeleteProductAsync DELETE /products/{id} Removes the product and its price history.
GetAccountAsync GET /account Your plan, the credits left (monthly allowance and packs), how many products you track and the credits they use per month, the credits each…
GetProductAsync GET /products/{id} The product's latest state and every price read of the period, oldest first. The history covers every read of this reference on this market…
GetWatchHistoryAsync GET /history Every price Watchlog read for a reference or listing id in a currency over the period, whoever tracks it, oldest first, with the lowest, hi…
ListProductsAsync GET /products Your watchlist, newest first, with each product's latest state and its recent prices (trend). Filter with watch_id (and marketplace) to kno…
SearchWatchesAsync GET /search Watch models matching the keywords first (watch_id is their reference number, price the lowest asking price last seen across the whole mark…
TrackProductAsync POST /products Adds a watch to your watchlist: a model by its reference number (126610LN), priced at the lowest asking price among the current listings th…
UpdateProductAsync PATCH /products/{id} Target price, drop alerts, check interval, or pause. Send only what changes. On the free plan, alerts (price drop, back on the market, targ…

All Watchlog SDKs

SDK Package Install
Node.js @watchlogdev/sdk npm install @watchlogdev/sdk
Python watchlogdev pip install watchlogdev
Go watchlog-go go get github.com/watchlogdev/watchlog-go
.NET Watchlog dotnet add package Watchlog
Ruby watchlogdev gem install watchlogdev
PHP watchlogdev/sdk composer require watchlogdev/sdk
Java watchlog-java build from source, see its README
CLI @watchlogdev/cli npm install -g @watchlogdev/cli
MCP server @watchlogdev/mcp npx -y @watchlogdev/mcp

Trademarks

Watch brand and model names are trademarks of their respective owners. Watchlog is an independent service, not affiliated with any watch brand, dealer or marketplace.

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 0 12/1/2026