Skip to main content

Official CLI for KlickAnalytics APIs

Project description

KlickAnalytics CLI

Financial market intelligence from your terminal, scripts, and AI agents.

KlickAnalytics CLI provides a simple way for developers, traders, researchers, and AI systems to access financial market data directly from the command line.

Instead of writing API requests manually, you can retrieve structured financial data instantly.

Example:

ka profile -s TSLA
ka quote -s NVDA
ka prices -s AAPL -sd 2025-01-01 -ed 2025-12-31
ka quantstats -s MSFT

Why KlickAnalytics CLI?

Most financial API workflows involve unnecessary friction:

  • writing HTTP request code
  • building authentication headers
  • managing JSON parsing
  • creating repetitive scripts
  • integrating APIs with agents or automation pipelines

KlickAnalytics CLI removes that friction by acting as a thin client that connects directly to the KlickAnalytics API platform.

Benefits:

  • extremely simple command interface
  • direct integration with your terminal
  • easy automation via scripts
  • agent-friendly JSON output
  • server-driven command routing
  • future commands added without updating the CLI

Built for Developers and AI Agents

KlickAnalytics CLI is designed to integrate easily with modern development and automation workflows.

It works well with:

  • local shell scripts
  • Python pipelines
  • research tools
  • cron jobs
  • AI agents
  • OpenClaw-style systems
  • MCP servers
  • local developer tools
  • automation pipelines

Because the CLI supports structured JSON output, agents can consume financial data without writing API wrappers.

Example:

ka --json quote -s MSFT

This allows AI tools or scripts to receive structured responses instantly.


Installation

Install from PyPI:

pip install klickanalytics-cli

After installation, the ka command becomes available globally.


Setting Your API Key

Create your account and generate your CLI API key in seconds.

Steps

  1. Register a free account

    👉 https://klickanalytics.com/signup

  2. Generate your API key

    👉 https://klickanalytics.com/user_apis

  3. Export your API key

export KLICKANALYTICS_CLI_API_KEY="your_api_key_here"

A fallback environment variable is also supported:

export KA_API_KEY="your_api_key_here"

Basic Usage

Display help:

ka help

List commands:

ka commands

Retrieve symbol profile:

ka profile -s TSLA

Get latest quote:

ka quote -s TSLA

Retrieve historical prices:

ka prices -s TSLA -sd 2025-01-01 -ed 2025-12-31

JSON Output

For scripts, automation, and AI workflows, you can request JSON output:

ka --json profile -s NVDA

Example output:

{
  "symbol": "NVDA",
  "name": "NVIDIA Corporation",
  "sector": "Technology"
}

Local Development

To connect the CLI to a local or staging API server:

export KA_DEV_ENDPOINT="http://127.0.0.1:8000/cli"

This allows you to test new commands or endpoints locally.


Protocol Version

Optional protocol version override:

export KA_PROTO=v1

Or specify at runtime:

ka --version v2 profile -s TSLA

Example Workflows

Shell Automation

for s in AAPL MSFT NVDA TSLA
do
  ka quote -s $s
done

Data Pipeline

ka --json prices -s NVDA > prices.json

AI Agent Workflow

ka --json volatility -s NVDA -sd 2025-01-01 -ed 2025-12-31

The structured output can be consumed directly by:

  • AI agents
  • Python scripts
  • automation workers
  • research pipelines

Environment Variables

Variable Description
KLICKANALYTICS_CLI_API_KEY API key for CLI authentication
KA_API_KEY fallback API key
KA_DEV_ENDPOINT optional local/staging API endpoint
KA_PROTO protocol version override

Design Philosophy

The CLI intentionally stays lightweight.

The client does not hardcode commands locally. Instead:

  • commands are forwarded to the server
  • the server validates and routes them
  • authentication is handled server-side
  • new commands can be added without updating the CLI

This architecture keeps the CLI simple and future-proof.


Development Install

Clone the repository:

git clone https://github.com/klickanalytics/klickanalytics-cli.git
cd klickanalytics-cli

Install locally:

pip install -e .

Documentation

Full CLI documentation:

https://www.klickanalytics.com/cli_documentation


License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

klickanalytics_cli-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

klickanalytics_cli-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file klickanalytics_cli-0.1.0.tar.gz.

File metadata

  • Download URL: klickanalytics_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for klickanalytics_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8cba071366465b2df1eded688260dcace4fe2f09b8d0fdc29317770bcd7a5a27
MD5 f1897898f0628622bdabe524b41aabab
BLAKE2b-256 74b3d36cb1b077c942ae8e65af054198e96f2f34155a9281b2634e1a60fbe485

See more details on using hashes here.

File details

Details for the file klickanalytics_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for klickanalytics_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6521651ba5377ab200ce89775c4217cffc75200409a05c04f9967e25d9dc8e2e
MD5 ddc68c89ec2007a15c85b9a802ad4c82
BLAKE2b-256 db1746e531800f394e9dcee2b2bc4ce38a7403d78600e14009e86bde6a853a0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page