> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sharpe.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Developer Tools

> SDKs, Postman collection, OpenAPI spec, MCP server, and other developer resources for the Sharpe API.

Official SDKs, testing tools, machine-readable specs, and AI integrations for the Sharpe API.

***

## Generated SDKs

The SDKs are not on npm or PyPI yet. Generate them locally from the [OpenAPI specification](https://www.sharpe.ai/openapi.json), the canonical contract, with any OpenAPI Generator target:

```bash Python theme={null}
openapi-generator-cli generate \
  -i https://www.sharpe.ai/openapi.json \
  -g python --additional-properties=projectName=sharpe-terminal-api,packageName=sharpe_terminal_api \
  -o ./sharpe-client
```

```bash TypeScript theme={null}
openapi-generator-cli generate \
  -i https://www.sharpe.ai/openapi.json \
  -g typescript-fetch --additional-properties=npmName=@sharpe-terminal/api \
  -o ./sharpe-client
```

Both SDKs follow the standard OpenAPI Generator pattern: a shared `Configuration` object plus per-category API classes (`AccountApi`, `ArbitrageApi`, `CategoriesApi`, `DerivativesApi`, `MarketDataApi`, `NewListingsApi`, `ScreenerApi`, `SignalsApi`, `SystemApi`).

```python Python usage theme={null}
from sharpe_terminal_api import ApiClient, Configuration, DerivativesApi

config = Configuration(
    host="https://www.sharpe.ai/api",
    api_key={"ApiKeyAuth": "sk_live_your_key_here"},
)

with ApiClient(config) as client:
    derivatives = DerivativesApi(client)
    rates = derivatives.get_funding_rates(type="current")
    for row in rates.data:
        print(f"{row.exchange} {row.symbol}: {row.rate}")
```

```ts TypeScript usage theme={null}
import { Configuration, DerivativesApi } from '@sharpe-terminal/api'

const config = new Configuration({
  basePath: "https://www.sharpe.ai/api",
  headers: { Authorization: 'Bearer sk_live_your_key_here' },
})

const api = new DerivativesApi(config)
const rates = await api.getFundingRates({ type: 'current' })
rates.data.forEach((r) => console.log(`${r.exchange} ${r.symbol}: ${r.rate}`))
```

***

## Postman Collection

Import the Postman collection to explore every endpoint interactively. All requests are pre-configured with variables for your API key and base URL.

1. Download [sharpe-api.postman\_collection.json](https://www.sharpe.ai/sharpe-api.postman_collection.json)
2. Open Postman and click **Import**
3. Set the `api_key` collection variable to a key from the [API key dashboard](https://www.sharpe.ai/dashboard/api-keys)
4. Send any request

***

## API reference

The [API reference](https://docs.sharpe.ai/api-reference.md) lists every endpoint with its parameters, response schema and request examples, generated from the OpenAPI spec.

* **Health and coverage endpoints** (`/v1/health`, `/v1/meta/coverage`) work without a key
* **Every data endpoint** requires your API key from a paid plan

[Open the API reference](https://docs.sharpe.ai/api-reference.md)

***

## Health check

`GET /v1/health`

Returns database reachability and News article freshness. This endpoint does not require an API key. It returns `200` only when the database is reachable and the newest News article is within the six-hour freshness SLA; stale, missing, invalid, or materially future timestamps return `503` with an explicit `stale` or `unknown` News status.

```bash cURL theme={null}
curl https://www.sharpe.ai/api/v1/health
```

```ts TypeScript theme={null}
const res = await fetch('https://www.sharpe.ai/api/v1/health')
const health = await res.json()
```

```python Python theme={null}
import requests

health = requests.get("https://www.sharpe.ai/api/v1/health").json()
```

The `checks.news` object includes `latest_published_at`, `age_seconds`, the `freshness_sla_seconds` threshold, the allowed `future_tolerance_seconds`, and `unknown_reason` when freshness cannot be trusted. Unknown reasons distinguish missing or invalid timestamps, future clock skew, a failed News query, and an unavailable database.

It also returns `datasets`: the freshness of each snapshot and cached dataset (`dataset_id`, `as_of`, `stale_after`, `freshness_sla_seconds`, `freshness_status`, and `unknown_reason` when it cannot be judged), read from the snapshot index and the cache rows, or `null` when the database is unreachable. A stale dataset does not change the status code.

***

## Coverage metadata

`GET /v1/meta/coverage`

Returns product-surface coverage metadata for Sharpe Terminal: UI routes, authenticated API routes, docs routes, OpenAPI paths, MCP tools, data sources, freshness SLAs, and test coverage. This endpoint does not require an API key.

```bash cURL theme={null}
curl https://www.sharpe.ai/api/v1/meta/coverage
```

```ts TypeScript theme={null}
const res = await fetch('https://www.sharpe.ai/api/v1/meta/coverage')
const { data } = await res.json()
```

```python Python theme={null}
import requests

coverage = requests.get("https://www.sharpe.ai/api/v1/meta/coverage").json()
```

***

## OpenAPI Specification

The full API is described in an [OpenAPI 3.0](https://spec.openapis.org/oas/v3.0.0) document. Use it with code generators, API clients, or documentation tools.

```bash Download the spec theme={null}
curl -O https://www.sharpe.ai/openapi.json
```

### Generate a client

```bash Generate a TypeScript client with openapi-typescript theme={null}
npx openapi-typescript https://www.sharpe.ai/openapi.json -o sharpe-api.d.ts
```

```bash Generate a Python client with openapi-python-client theme={null}
openapi-python-client generate --url https://www.sharpe.ai/openapi.json
```

The spec is also available at [/openapi.json](https://www.sharpe.ai/openapi.json) on the docs site.

***

## MCP Server

The Sharpe MCP server gives AI agents (Claude, Cursor, and any MCP client) direct access to crypto market data through 42 tools (39 endpoint tools plus 3 composite workflows), 5 resources, and 2 guided prompts. Run the published npm package with `npx -y @sharpe-terminal/mcp-server`.

[Full MCP server guide](https://docs.sharpe.ai/mcp-server.md)

***

## Command line (CLI)

The same npm package is a CLI over the API: one command per MCP endpoint tool, generated from the same contracts, with the same `SHARPE_API_KEY`, plan and trial. With no arguments the package runs the MCP server; any argument runs one command.

```bash Run a command theme={null}
export SHARPE_API_KEY=sk_live_your_key_here
npx @sharpe-terminal/mcp-server help
npx @sharpe-terminal/mcp-server funding-rates --coin BTC --limit 5
npx @sharpe-terminal/mcp-server arbitrage-spot-perp --min-oi-usd 1000000 --table
```

* A command is the tool name without `get_`, in kebab-case (`get_funding_rates` is `funding-rates`); `<command> --help` lists its flags with their types, enums and defaults, and `schema <command>` prints the route, description and flag JSON Schema for an agent.
* Flags are the endpoint's parameters in kebab-case (`--min-oi-usd`); the API's own spelling works too. Values are checked against the schema before anything is sent.
* stdout carries the API's JSON answer as served (`data`, `pagination`, `meta`), or the problem+json of an API error; `--table` prints the rows as a table. Messages go to stderr.
* Exit codes: `0` ok, `1` other failure, `2` usage error (nothing sent), `3` key or plan (401, 403), `4` rate limit or monthly quota (429).

***

## Agent skills

The [Sharpe skills](https://github.com/Sharpe-Labs/skills) teach an agent which tool answers which question, how to report freshness, and how to connect: `npx skills add Sharpe-Labs/skills`, or the Claude Code plugin that also adds the hosted server. See [Installation](https://docs.sharpe.ai/mcp-server.md#installation) on the MCP page. Agents that discover skills from a site read [`/.well-known/agent-skills/index.json`](https://www.sharpe.ai/.well-known/agent-skills/index.json).

***

## llms.txt

The API documentation is available in a plain-text format optimized for LLM consumption at [/llms-full.txt](https://www.sharpe.ai/llms-full.txt). The shorter [/llms.txt](https://www.sharpe.ai/llms.txt) file is the site-wide agent summary; the full file includes every endpoint, parameter, and response shape in a single reference.

```bash Fetch the LLM-friendly reference theme={null}
curl https://www.sharpe.ai/llms-full.txt
```

***

## Authentication reminder

Use header-based authentication in generated clients and API tools: `Authorization: Bearer` is recommended, and `X-API-Key` is also supported. Query-string API keys are rejected by default because URLs are commonly stored in logs, browser history, analytics tools, and referrer headers. See the [authentication guide](https://docs.sharpe.ai/authentication.md) for details.

[Back to the quickstart guide](https://docs.sharpe.ai/quickstart.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.