Documentation
Everything you need to integrate The Block Pro API.
API Reference
Interactive Swagger UI with all endpoints, request/response schemas, and try-it-out functionality.
OpenAPI Spec
Download the OpenAPI 3.0 specification for code generation and tooling integration.
Quick Start
cURL
# With API Key
curl -H "X-API-Key: your_api_key" \
https://pro-api.theblock.co/api/v1/data/charts
# With Bearer Token
curl -H "Authorization: Bearer your_jwt_token" \
https://pro-api.theblock.co/api/v1/data/chartsPython
import requests
# With API Key
resp = requests.get(
"https://pro-api.theblock.co/api/v1/data/charts",
headers={"X-API-Key": "your_api_key"}
)
# With Bearer Token
resp = requests.get(
"https://pro-api.theblock.co/api/v1/data/charts",
headers={"Authorization": "Bearer your_jwt_token"}
)
data = resp.json()JavaScript
// With API Key
const resp = await fetch(
"https://pro-api.theblock.co/api/v1/data/charts",
{ headers: { "X-API-Key": "your_api_key" } }
);
// With Bearer Token
const resp = await fetch(
"https://pro-api.theblock.co/api/v1/data/charts",
{ headers: { "Authorization": "Bearer your_jwt_token" } }
);
const data = await resp.json();Authentication Methods
The API supports three authentication methods. Use whichever fits your integration best.
1. API Key X-API-Key
Best for server-to-server integrations. Generate an API key from the Dashboard and pass it in every request.
curl -H "X-API-Key: tbk_your_api_key_here" \
https://pro-api.theblock.co/api/v1/data/charts2. Bearer Token Authorization
Login to receive a JWT access token, then pass it as a Bearer token. Tokens expire periodically — use the refresh mechanism or re-login as needed.
# Step 1: Login
curl -X POST https://pro-api.theblock.co/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "your_password"}'
# Response: { "access_token": "eyJ...", "refresh_token": "...", ... }
# Step 2: Use the token
curl -H "Authorization: Bearer eyJ..." \
https://pro-api.theblock.co/api/v1/data/charts3. Legacy Header x-auth-token
For backwards compatibility with existing integrations, you can pass the same JWT token via the x-auth-token header instead of Authorization: Bearer.
curl -H "x-auth-token: eyJ..." \
https://pro-api.theblock.co/api/v1/data/chartsFor Existing theblock.pro API Customers
If you have an existing API key from theblock.pro, you can use it to authenticate — no re-registration required. Your existing product subscriptions (Data API, Intel API, News API, etc.) are automatically recognized.
How It Works
- Login with your existing email and API key (instead of a password):
curl -X POST https://pro-api.theblock.co/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"api_key": "your_existing_theblock_pro_key"
}'
# Response:
# {
# "access_token": "eyJ...",
# "refresh_token": "...",
# "token_type": "Bearer",
# "user": { "email": "[email protected]", ... }
# }- Use the returned JWT token for all subsequent requests:
curl -H "Authorization: Bearer eyJ..." \
https://pro-api.theblock.co/api/v1/data/intel/dealsYour subscription features are embedded in the JWT — the API automatically grants access to the endpoints your plan covers.
Token Refresh
For long-running integrations, you can opt in to automatic token refresh by adding the X-Refresh-Token: true header to any data request. When present on a successful response, the API wraps the response with a fresh JWT.
curl -H "Authorization: Bearer eyJ..." \
-H "X-Refresh-Token: true" \
https://pro-api.theblock.co/api/v1/data/charts
# Response:
# {
# "token": "eyJ...new_token...",
# "message": "Success",
# "data": { ...original response... }
# }Use the new token value for your next request — no separate refresh call needed.
Note: Token refresh only fires on successful (2xx) responses for users with active subscriptions. Error responses and unauthenticated requests are returned unchanged.
Available Endpoints
All data endpoints are under /api/v1/data. See the API Reference for full request/response schemas.
Charts
/data/charts — List available charts/data/charts/{id} — Get chart data with time range/data/charts/batch — Fetch multiple charts at onceNews
/data/news — News feed with pagination and filters/data/news/{slug} — Single article by slug/data/news/categories — List news categoriesIntel
/data/intel/deals — Funding deals with amount/valuation filters/data/intel/companies — Company profiles and funding history/data/intel/investors — Investor profiles/data/intel/protocols — Protocol data with name filter/data/intel/funding — Aggregated funding data/data/intel/investors-data — Detailed investor analytics/data/intel/sentiment — Market sentiment and trending topicsResearch
/data/intel/research — Research reports (Business plan+)Feature Access by Product
Your subscription products determine which endpoints you can access. Each product unlocks a specific set of features.
| Subscription Product | Unlocked Endpoints |
|---|---|
| Data API | /data/charts /data/charts/{id} /data/charts/batch |
| News API | /data/news /data/news/{slug} /data/news/categories |
| Priority News API | All News API endpoints + priority access |
| Intel API | /data/intel/deals /data/intel/companies /data/intel/investors /data/intel/protocols /data/intel/funding /data/intel/investors-data |
| Research | /data/intel/research |
The /data/intel/sentiment endpoint is available to all authenticated users regardless of subscription.