-
Couldn't load subscription status.
- Fork 7
Getting Started
Shravan Jambukesan edited this page Apr 30, 2021
·
3 revisions
First, install the package via NuGet by searching for TwelveDataSharp: https://www.nuget.org/packages/TwelveDataSharp/
Then, import the following namespaces:
using TwelveDataSharp;
using TwelveDataSharp.Interfaces;
using TwelveDataSharp.Library.ResponseModels;Now, we can create a TwelveDataClient object with a managed HttpClient and Twelve Data API key
HttpClient _client = new HttpClient();
ITwelveDataClient _twelveDataClient = new TwelveDataClient(twelveDataApiKey, _client);Access various Twelve Data APIs like so:
var quote = await _twelveDataClient.GetRealTimePriceAsync("AAPL");
double price = quote.Price;