Skip to content

Developer Tools

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, the canonical contract, with any OpenAPI Generator target:

Python

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

TypeScript

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 usage

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}")

TypeScript usage

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
  2. Open Postman and click Import
  3. Set the api_key collection variable to a key from the API key dashboard
  4. Send any request

API Playground

The interactive API playground lets you explore every endpoint, fill in parameters, send live requests, and see responses in the browser. Code snippets are auto-generated in 25+ languages.

  • Free endpoints work without authentication, so you can try them right away
  • Authenticated endpoints require your API key (paste it in the auth panel)
  • Code generation in Python, TypeScript, cURL, Go, PHP, Ruby, Java, and more

GET/v1/health

Health check

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.

Request

GET
/v1/health
curl https://www.sharpe.ai/api/v1/health

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.


GET/v1/meta/coverage

Coverage metadata

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

Request

GET
/v1/meta/coverage
curl https://www.sharpe.ai/api/v1/meta/coverage

OpenAPI Specification

The full API is described in an OpenAPI 3.0 document. Use it with code generators, API clients, or documentation tools.

Download the spec

curl -O https://www.sharpe.ai/openapi.json

Generate a client

Generate a TypeScript client with openapi-typescript

npx openapi-typescript https://www.sharpe.ai/openapi.json -o sharpe-api.d.ts

Generate a Python client with openapi-python-client

openapi-python-client generate --url https://www.sharpe.ai/openapi.json

The spec is also available at /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 43 tools (40 endpoint tools plus 3 composite workflows), 4 resources, and 2 guided prompts. Run the published npm package with npx -y @sharpe-terminal/mcp-server.


CLI tool

The Sharpe CLI provides 34 commands for accessing market data from your terminal. Its Python source is available in the repository; the first PyPI release is pending, so follow the source-run instructions in the CLI guide instead of using uvx or pip.


llms.txt

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

Fetch the LLM-friendly reference

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 for details.

Was this page helpful?