Skip to main content

Python SDK Getting Started

The CloudQuant Data Liberator Python SDK provides the simplest way to query and work with CloudQuant datasets from any Python environment.

Prerequisites

  • Python 3

Installation

conda create -n liberator python=3.7
conda activate liberator
conda install -c anaconda requests
conda install pandas
conda install -c conda-forge httpx async_generator pyarrow=8.0.0

Required Security Files

You need three files from your Downloads ZIP file, all placed in your working directory or Python environment:
  • liberator.pfx — Security certificate
  • liberator.py — The CloudQuant Data Liberator API for Python
  • liberator.json — Contains your Username and Token
These three files (liberator.pfx, liberator.py, and liberator.json) must be in your working directory.
When using Jupyter Notebooks, set the working directory to the location containing liberator.pfx and liberator.json. See this reference for changing the Jupyter Notebook startup folder on Windows.

Optional: CloudQuant Charting

If using CloudQuant Charting (included with the API), install these additional packages:
  • plotly
  • TALib
  • numpy

Quick Start

import liberator

liberator.url = 'https://api.cloudquant.ai'

df = liberator.get_dataframe(
    liberator.query(
        name='daily_bars',
        as_of='2020-11-15',
        symbols=['AAPL']
    )
)

print(df)