Skip to content

tudormobile/fdncs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fdncs

C# SDK for FinancialData.Net API

Build and Deploy Publish Docs

Note

The current state is pre-release. Not all endpoints are implemented.

Installation

dotnet add package Tudormobile.FinancialData

Quick Start

Basic API:

using Tudormobile.FinancialData;

// Create an instance of HttpClient to be used for making API requests.
using var httpClient = new HttpClient();

// Replace "your_api_key" with your actual API key for the financial data service.
var client = IFinancialDataClient.Create("your_api_key", httpClient);

// Get Stock Prices for Microsoft (MSFT)
var stockPrices = client.GetStockPricesAsync(identifier: "MSFT").Result;
Console.WriteLine(stockPrices.Data?[0]);

Tip

See the sample 'SimpleConsoleApp' located in the src/samples/ folder.

Using the extensions:

using Tudormobile.FinancialData;
using Tudormobile.FinancialData.Extensions;

// Create an instance of HttpClient to be used for making API requests.
using var httpClient = new HttpClient();

// Replace "your_api_key" with your actual API key for the financial data service.
var client = FinancialDataApi.CreateClientBuilder()
                .WithApiKey("your_api_key")
                .WithHttpClient(httpClient)
                .Build();

// Get Stock Prices for Microsoft (MSFT)
var stockPrices = await client.GetStockPricesAsync(identifier: "MSFT");
Console.WriteLine(stockPrices.Data?[0]);

Using dependency injection:

using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Tudormobile.FinancialData;
using Tudormobile.FinancialData.Extensions;

HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);

// Replace "your_api_key" with your actual API key for the financial data service.
builder.Services
    .AddFinancialDataClient(options => 
        { 
            options.WithApiKey("your-api-key"); 
        })
    .AddLogging(builder => builder.AddConsole());

using IHost host = builder.Build();

var client = host.Services.GetRequiredService<IFinancialDataClient>();
// Get Stock Prices for Microsoft (MSFT)
var stockPrices = await client.GetStockPricesAsync(identifier: "MSFT");
Console.WriteLine(stockPrices.Data?[0]);

Tip

See the sample 'ExtendedConsoleApp'.

MIT Licence. Copyright (c) 2026 Bill Tudor

NuGET Package README | Source Code README | API Documentation

About

A C# SDK for FinancialData.Net API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors