C# SDK Getting Started
The CloudQuant Data Liberator C# SDK streams data as Arrow Record Batches, which can be converted to Microsoft DataFrames.
Required Security Files
You need the following files from your Downloads ZIP, placed in your working directory:
liberator.pfx — Security certificate
liberator.json — Contains your Username and Token
liberator.pfx and liberator.json must be in your working directory.
Quick Start
Query and Iterate Record Batches
Liberator liberator;
var res = liberator.query(new Dictionary<string, dynamic>() {
{"name", "daily_bars"},
{"as_of", "2021-04-10"},
{"back_to", "2021-03-10"},
{"symbols", "ES"}
});
foreach (RecordBatch batch in res())
{
var df = DataFrame.FromArrowRecordBatch(batch);
Console.WriteLine(DateTime.Now.ToString("hh:mm:ss.fff") + " " + DataFrameUtils.PrettyPrint(df));
}
Get DataFrame Directly
var res = liberator.query(new Dictionary<string, dynamic>() {
{"name", "daily_bars"},
{"as_of", "2021-04-10"},
{"back_to", "2021-03-10"},
{"symbols", "ES"}
});
var df = liberator.get_dataframe(res);
Console.WriteLine(DataFrameUtils.PrettyPrint(df));