Skip to main content

Official CLI for KlickAnalytics APIs

Project description

KlickAnalytics CLI

PyPI version Python versions License

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

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:

Example Commands

ka profile -s TSLA
ka quote -s NVDA
ka prices -s AAPL -sd 2025-01-01 -ed 2025-12-31
ka quantstats -s MSFT
ka ai-chat -q "Give me latest news summary on TSLA"

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.1.tar.gz (6.5 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.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: klickanalytics_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 6.5 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.1.tar.gz
Algorithm Hash digest
SHA256 4ee704636d32a0343960e347dfba56aeabfa5bdf1ed567ab9a7af277d5f553c1
MD5 2ce2789a43fe039a65dd1d9c550a8c9c
BLAKE2b-256 f97448d03f1e397c2a47891654784ef0a71e019620e0420287ba1bc3d265153a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for klickanalytics_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ba41290dd6140d0c35516629732f3f97318e8462bccc70ea32620813aaeaa84
MD5 63b662e48d93c531f335caa99841d553
BLAKE2b-256 975af77b18dcd45c365440ee67507abdad0214c062528c5bd7a31775c26f2d75

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