Quickstart
This guide will get you up and running with the Sharpe API. You will make your first request, understand the response envelope format, and learn how errors are returned.
You need an API key to authenticate requests. Get one from the /docs/authentication under Settings » API Keys.
Make your first request
Every request goes to https://www.sharpe.ai/api/v1/ and requires an Authorization header. Here is how to fetch current funding rates:
curl -G https://www.sharpe.ai/api/v1/funding/rates \
-H "Authorization: Bearer sk_live_your_key_here" \
-d type=current
Response envelope
Every successful response wraps data in a consistent envelope:
{
"data": [
{
"exchange": "binance",
"symbol": "BTCUSDT",
"base_coin": "BTC",
"rate": 0.0001,
"interval_hours": 8,
"next_funding_time": "2026-03-27T08:00:00Z",
"updated_at": "2026-03-27T07:45:00Z"
},
{
"exchange": "bybit",
"symbol": "BTCUSDT",
"base_coin": "BTC",
"rate": 0.00012,
"interval_hours": 8,
"next_funding_time": "2026-03-27T08:00:00Z",
"updated_at": "2026-03-27T07:44:30Z"
}
],
"meta": {
"request_id": "req_abc123def456ghij",
"timestamp": "2026-03-27T07:45:00Z"
}
}
The envelope always contains:
data— the requested payload (shape varies by endpoint)meta— request metadata includingrequest_idandtimestamp
Error format
When something goes wrong, the API returns a flat RFC 9457 problem detail object:
{
"type": "https://www.sharpe.ai/errors/invalid_parameter",
"title": "Invalid Parameter",
"status": 400,
"detail": "Invalid parameter \"type\": Invalid enum value. Expected 'current' | 'accumulated' | 'history'",
"request_id": "req_abc123def456ghij",
"doc_url": "https://www.sharpe.ai/docs/errors#error-codes",
"suggested_action": "Check the parameter value against the endpoint documentation."
}
Common use cases
Here are the most popular ways developers use the Sharpe API:
Monitor funding rates for arbitrage
Fetch type=current to scan for outlier funding rates, then use type=accumulated to see whether the rate has been persistently positive or negative over 7–30 days. Pair with the spot-perp arbitrage endpoint to surface opportunities automatically.
Build a market heatmap
Call the heatmap endpoint with mode=coins and a category like layer-1 or meme-token to get performance data across multiple timeframes in a single request. Each dot includes 24h, 7d, 30d, 1y, and 3y returns.
Portfolio correlation analysis
Use the correlation endpoint with a mix of crypto IDs and TradFi IDs (e.g., bitcoin,ethereum,sp500,gold) to compute a correlation matrix. Choose a period of 90d or 1y to match your rebalancing horizon.
Track narrative rotation
The narratives and ecosystems endpoints return aggregated market cap, volume, and performance for sector-level groupings. Compare narrative-level 24h and 7d changes to spot which sectors capital is rotating into.
Best practices
- Cache aggressively — Most endpoints return data that updates on a known schedule (funding rates every 8h, heatmap every 5 min). Cache locally and respect
Cache-Controlheaders to avoid burning quota. - Use bulk responses — Endpoints like
/v1/funding/rates?type=currentreturn all symbols at once. Fetch once and filter client-side rather than making per-symbol requests. - Handle 429s gracefully — Read the
X-RateLimit-Resetheader (a Unix timestamp) and wait until that time before retrying. See the rate limits guide for details. - Include
X-Request-Idin support tickets — Every response includes this header. It lets us trace your exact request through our infrastructure. - Use separate keys per environment — Create distinct API keys for development, staging, and production so you can rotate or revoke them independently.