Documentation
Ask on ChatGPT

REST API Authentication

Downloads can be made without credentials through the free tier, limited to 60 requests per minute per client IP. API key authentication and JWT token-based authentication are supported for authenticated access.

Free Tier

Omit credentials to use the free tier. Invalid credentials are rejected instead of being treated as anonymous requests.

bash
# Download a single file without credentials
curl "https://api.cryptohftdata.com/download?file=binance_spot/2025-08-01/20/BTCUSDT_trades.parquet.zst" \
  -o BTCUSDT_trades_20.parquet.zst

API Key Authentication

Include your API key as a query parameter in the request URL.

bash
# Download a single file using API key
curl "https://api.cryptohftdata.com/download?file=binance_spot/2025-08-01/20/BTCUSDT_trades.parquet.zst&api_key=your-api-key-here" \
  -o BTCUSDT_trades_20.parquet.zst

JWT Token Authentication (Recommended)

For enhanced security and speed, use JWT tokens in the Authorization header. First, obtain a JWT token using your API key, then use the token for subsequent requests.

Step 1: Get JWT Token

bash
# Get JWT token
JWT_TOKEN=$(curl -s -X POST "https://api.cryptohftdata.com/jwt-token" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-api-key-here" | \
  jq -r '.jwt_token')

Step 2: Use JWT Token for Downloads

bash
# Download file using JWT token
curl "https://api.cryptohftdata.com/download?file=binance_spot/2025-08-01/20/BTCUSDT_trades.parquet.zst" \
  -H "Authorization: Bearer $JWT_TOKEN" \
  -o BTCUSDT_trades_20.parquet.zst

Security Benefits

JWT tokens have limited 4 hour lifetimes and don't expose your API key in URLs, making them more secure for production use. Direct S3 credentials and JWT token issuance still require authenticated access.

Have questions?

Our support team is available to help you with integration.

Contact Support