Folidata 1.0.3
See the version list below for details.
dotnet add package Folidata --version 1.0.3
NuGet\Install-Package Folidata -Version 1.0.3
<PackageReference Include="Folidata" Version="1.0.3" />
paket add Folidata --version 1.0.3
#r "nuget: Folidata, 1.0.3"
// Install Folidata as a Cake Addin #addin nuget:?package=Folidata&version=1.0.3 // Install Folidata as a Cake Tool #tool nuget:?package=Folidata&version=1.0.3
Folidata.SDK.CSharp
This c# example libary is a SDK for the folidata finance api service. With this SDK you can download end-of-day historic stock prices and prices for other assets like cryptos, indices, etc.
Compatibility
Contents
General
This C# example library is an SDK for the folidata finance API service. With this SDK you can download end-of-day historic stock prices and prices for other assets like cryptos, indices, etc.
Requirements
To use this API you need an API key. You can register for a free API key at www.folidata.com. Actually, the site language is in German.
With a free account you can use this API for 100 API calls a day. For more API calls you can submit for a paid package.
Documentation
A full documentation is available under this link (actually in German). But the API is easy to use:
Init
With the following code, you init the http client with your personal API key:
using Folidata;
var key = "YOUR_API_KEY";
var api = new FolidataApi(key);
List of stock exchanges and supported symbols
To get the full list of supported exchanges use this code:
var exchanges = await _api.GetExchangeAsync();
Then you can get all the symbols of a stock exchange:
var exchanges = await _api.GetSymbolsAsync("US");
Other supported lists to get the supported symbols:
- Crypto GetCryptosAsync()
- Forex Pairs GetForexAsync()
Historical End-Of-Day Prices
Just one line of code is enough to get the all historic prices for the apple stock.
var prices = await api.GetPricesAsync("AAPL.US");
To get data for a specific day:
var prices = await api.GetPriceAsync("AAPL.US",new DateTime(2022, 01, 02));
For a specific time range:
var prices = await api.GetPricesAsync("AAPL.US",new DateTime(2021, 01, 02), new DateTime(2022, 06, 01));
Sort the result:
var prices = await api.GetPricesAsync("AAPL.US", new DateTime(2021, 01, 02), new DateTime(2022, 06, 01), Folidata.Utils.SortMode.DESC);
Limit the results:
var prices = await api.GetPricesAsync("AAPL.US", new DateTime(2021, 01, 02), new DateTime(2022, 06, 01), Folidata.Utils.SortMode.DESC, 100);
All given parameters/methods are also possible in the following methods:
- GetCryptoPricesAsync("SHIB-USD")
- GetForexPricesAsync("USDEUR")
- GetIndexPricesAsync("GDAXP")
Key State
To check your current limits and datapoints count:
var state = await api.GetKeyStateAsync();
Dokumentation Deutsch
Die vollständige Dokumentation ist unter folgenden Link zu finden.
Init
Mit dem folgenden Code initialisierst du den HTTP Client mit deinem persönlichen API Key:
using Folidata;
var key = "YOUR_API_KEY";
var api = new FolidataApi(key);
Liste aller Handelplätze und Symbole
Eine vollständige Liste aller unterstützten Handelsplätze erhälst du mir nur einer Zeile Code:
var exchanges = await _api.GetExchangeAsync();
Um alle unterstützen Symbole zu erhalten:
var exchanges = await _api.GetSymbolsAsync("US");
Um weitere unterstütze Symbole zu erhalten verwende folgende Methoden:
- Crypto GetCryptosAsync()
- Forex Pairs GetForexAsync()
Historische End-of-day Kurse
Mit einer Zeile Code erhälst du alle historischen Kurse der Apple Aktie.
var prices = await api.GetPricesAsync("AAPL.US");
Um die Kursdaten eines spezifischen Tages zu erhalten:
var prices = await api.GetPriceAsync("AAPL.US",new DateTime(2022, 01, 02));
Zeitspanne:
var prices = await api.GetPricesAsync("AAPL.US",new DateTime(2021, 01, 02), new DateTime(2022, 06, 01));
Sortieren der Ergebnisse:
var prices = await api.GetPricesAsync("AAPL.US", new DateTime(2021, 01, 02), new DateTime(2022, 06, 01), Folidata.Utils.SortMode.DESC);
Limittieren der Ergebnisse:
var prices = await api.GetPricesAsync("AAPL.US", new DateTime(2021, 01, 02), new DateTime(2022, 06, 01), Folidata.Utils.SortMode.DESC, 100);
Alle oben beschriebenen Parameter gelten auch für die folgenden Kursabfragen:
- GetCryptoPricesAsync("SHIB-USD")
- GetForexPricesAsync("USDEUR")
- GetIndexPricesAsync("GDAXP")
Aktueller Status deines Datenpakets
Um die Limits und aktuellen verbrauchten Datenpunkte zu sehen:
var state = await api.GetKeyStateAsync();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net6.0
- Newtonsoft.Json (>= 13.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.