# AI agent skill

Koinju ships an open **agent skill** that teaches AI coding assistants — [Claude Code](https://claude.com/claude-code), Cursor, GitHub Copilot, Windsurf, Gemini, and 15+ others — how to work with this API.

## Why use it

* Fast development environement setup for testing the API
* Auto-discoverability of API capabilities (endpoints, SQL tables, data types)
* Help with optimisation of SQL queries and API calls
* Help with integration of API data into research, backtesting, and production pipelines

It bundles:

* **Schema knowledge** — every `api.*` table and column
* **Auth + setup** — a one-command project bootstrap (`uv`/`venv`, dependencies, `.koinju.env`)
* **REST + SQL routing** — when to hit the public `/market/*` endpoints vs. ClickHouse SQL.
* **Cookbook recipes** — How to run common financial data analysis (Sortino, max drawdown, Bollinger, historical volatility, cross-exchange arbitrage, …) inside the koinju DB.
* **Integration patterns** — wiring Koinju into existing trading and research stacks.

## Install

Via the [skills.sh](https://skills.sh) CLI:

```bash
npx skills add https://gitlab.com/koinju-public/agent-skill        # into ./.claude/skills/
npx skills add https://gitlab.com/koinju-public/agent-skill -g     # global ~/.claude/skills/
```

Update later with `npx skills update koinju`. The skill is open source at [gitlab.com/koinju-public/agent-skill](https://gitlab.com/koinju-public/agent-skill).

## Example prompts it handles

Once installed, describe what you want in plain language — the agent picks the right interface (REST vs SQL), writes the query, handles credentials, and returns a working result:

* "Set up a project to test the Koinju API."
* "What Bitcoin products are available on Koinju?"
* "Plot the BTC option smile for OKX and Bybit using Koinju data."
* "Retrieve the implied volatility for BTC options."
* "Optimize the query that computes the average price of LINK-USDT over the past year."
* "Benchmark this strategy against buy-and-hold using Koinju data."
* "We have a Postgres database of crypto prices — how do I integrate it with Koinju?"

{% hint style="info" %}
Don't have credentials yet? Sign up at [koinju.io/pricing](https://koinju.io/pricing). The skill walks the agent (and you) through the rest.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.koinju.io/ai-agent-skill.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
