REST API

REST API Authentication

You can download files without credentials on the free tier. The free tier has a limit of 60 requests per minute for each client IP. For authenticated access, you can use an API key or a JWT token.

Free Tier

To use the free tier, send the request without credentials. If you send credentials that are not valid, the API rejects the request. It does not change it into an anonymous request.

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

API Key Authentication

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

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

JWT Token Authentication (Recommended)

For better security and speed, send a JWT token in the Authorization header. First, use your API key to request a JWT token. Then send the token with each request that follows.

Step 1: Request a JWT Token

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

Step 2: Download Files with the JWT Token

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

Security Benefits

A JWT token expires after 4 hours. It also keeps your API key out of URLs. Thus, JWT tokens are more secure for production use. You must authenticate to receive direct S3 credentials or a JWT token.

If you cannot find the information that you need, tell us. We also help with integrations.

Contact support