Skip to main content

QuickFS API SDK

forthebadge made-with-python

Python Version Maintenance

Contents

  1. General description
  2. Requirements
  3. Installation
  4. Demo
  5. Documentation
  6. Disclaimer

General description ⬆️

This library is the Python 🐍 unofficial SDK for the QuickFS REST API. It's intended to be used for data extraction for financial valuations.

Requirements ⬆️

  • You need to request an API key with the QuickFS team. Create your account in the following link
  • Python >= 3.8

Installation ⬆️

pip install quickfs

Demo ⬆️

The endpoints of the API will let you request fundamental data for your financial valuation. Here is a demo of its use:

from quickfs import QuickFS
import os

# load the key from the enviroment variables
api_key = os.environ['API_QUICKFS']

client = QuickFS(api_key)

# Request reference data for the supported companies
resp = client.get_api_metadata()
resp = client.get_supported_companies(country='US', exchange='NYSE')
resp = client.get_updated_companies(country='US', date='20210420')

# Available metrics in the API
resp = client.get_available_metrics()

# Request fundamental data for each company
resp = client.get_data_range(symbol='AAPL:US', metric='shares_eop', period='FQ-15:FQ')
resp = client.get_data_full(symbol='AAPL:US')
resp = client.get_data_batch(companies=['KO:US', 'PEP:US'], metrics=['roa', 'roic'], period="FY-2:FY")

# Usage history
resp = client.get_usage()

tutorial on how to save and load environment variables in Python -> Hiding Passwords and Secret Keys in Environment Variables (Windows)

Documentation ⬆️

All the methods will use the following instance of the general class:

from quickfs import QuickFS
import os

# load the key from the enviroment variables
api_key = os.environ['API_QUICKFS']
# client instance
client = QuickFS(api_key)

Companies ⬆️

  • get_api_metadata: Returns the available countries and exchanges where to get data.
    • arguments:* None
    • usage:
# get the metadata for the countries and exchanges.
client.get_api_metadata()
  • get_supported_companies: Returns a list of ticker symbols supported by QuickFS. You need to specify a country code (US, CA, MM, AU, NZ, MN, or LN). It is recommendable to use the get_api_metadata to get the references for each argument.
    • arguments:
      • country(str): quickfs code of the country to request data.
      • exchange(str): quickfs code of the exchange to request data.
    • usage:
# get the companies for the NYSE exchange
NYSE = client.get_supported_companies(country='US', exchange='NYSE')
# get the companies for the LSE
LSE = client.get_supported_companies(country='LN', exchange='LONDON')
# get the companies from Australia
ASX = resp = client.get_supported_companies(country='AU', exchange='ASX')
  • get_updated_companies: Returns a list of ticker symbols that were updated with new financial data on or after the specified date (formatted as YYYYMMDD). You need to specify a country code (US, CA, MM, AU, NZ, MN, or LN).
    • arguments:
      • country(str): quickfs code of the country to request data.
      • date(str): specific date to request data, it should be written in the following format YYYYMMDD. Please be aware that may be a delay in the company update and the actual update in the quickfs database.
    • usage
# get the updated companies from New Zeland
client.get_updated_companies(country='NZ', date='20210420')

Metrics ⬆️

  • get_available_metrics: Returns a list of available metrics with the associated metadata.
    • arguments: None
    • usage:
# get the supported metrics by quickfs
client.get_available_metrics()

Datapoints ⬆️

It is highly recommendable to use the country identifier code for non-U.S. stocks. If you do not specify a country, the API will first try to match a U.S.-listed symbol and, if none is found, will then match with a non-U.S. company with the same symbol. The order of the returned data is from oldest to more recent data.

Additionally, the period or period range to query should have the following structure period or from:to respectively. For example, revenue is reported quarterly and annually, as determined by a company's fiscal calendar. FY-9:FY represents the last 10 years of annual revenue figures. Similarly, the last 20 quarters of reported quarterly revenue is characterised by the periods FQ-19:FQ.

  • get_data_range: Returns range of data points for a single company metric.
    • arguments:
      • symbol(str): company symbol. for example: AAPL:US
      • metric(str): QuickFS metric name.
    • usage:
# get the shares outstanding (shares that have been authorized, issued, and purchased by investors and are held by them).
client.get_data_range(symbol='AAPL:US', metric='shares_eop', period='FQ-15:FQ')
  • get_data_full: Pull metadata and all financial statements (annual and quarterly) for all periods for a single stock in one API call.
    • arguments:
      • symbol(str): company symbol. for example: AAPL:US
    • usage:
# get the full data for finnCap Group plc
client.get_data_full(symbol='FCAP:LN')
  • get_data_batch: Batch request for several companies retrieving multiple metrics.
    • arguments:
      • companies(List[str]): List of companies to query.
      • metrics(List[str]): List of metrics to query.
      • period(str): Period or period range to query.
    • usage:
# Get the last 3 years of ROA and ROIC for Cocacola and Pepsi
client.get_data_batch(companies=['KO:US', 'PEP:US'], metrics=['roa', 'roic'], period="FY-2:FY")

Usage history ⬆️

  • get_usage: Returns your current API usage and limits.
    • arguments: None
    • usage:
client.get_usage()

Disclaimer ⬆️

The information in this document is for informational and educational purposes only. Nothing in this document may be construed as financial, legal or tax advice. The content of this document is solely the opinion of the author, who is not a licensed financial advisor or registered investment advisor. The author is not affiliated as a promoter of QuickFS services.

This document is not an offer to buy or sell financial instruments. Never invest more than you can afford to lose. You should consult a registered professional advisor before making any investment.

Metadata

Release files for quickfs 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for quickfs 0.1.1
File Size Uploaded
quickfs-0.1.1.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for quickfs 0.1.1
File Interpreter ABI Platform
quickfs-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.9 kB

Release files / quickfs-0.1.1.tar.gz

Download URL quickfs-0.1.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ac8633f49ec89f0292137e2af5116162f9c4b87a3823be081bfec5058d8bd639
BLAKE2b-256 checksum
How to use checksums
e51f2f0fcf060983e5385908c51b3fe3dc606326459b3a2483ecc51f34466fac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Release files / quickfs-0.1.1-py3-none-any.whl

Download URL quickfs-0.1.1-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a1f631a410a9ba0306f336c0f942cc17a8a795eb530799cc97ab7d2a530c3d9
BLAKE2b-256 checksum
How to use checksums
57d32f81ee335e0ba31970d735d75cd85059b9dce539d3f3516d9eb2f12e8451
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page