Authentication
You must authenticate to use the CryptoHFTData API. To authenticate, you must have an API key. You can make an API key in your dashboard.
Get Your API Key
- Log in to your CryptoHFTData dashboard.
- In the API Access section, click "Generate API Key".
- Copy your API key. Keep it in a safe location.
Use Your API Key
Python
1import cryptohftdata as chd
2import os
3
4# Method 1: Pass API key directly
5client = chd.CryptoHFTDataClient(api_key="your-api-key-here")
6
7# Method 2: Set environment variable
8os.environ['CRYPTOHFTDATA_API_KEY'] = 'your-api-key-here'
9client = chd.CryptoHFTDataClient() # Will automatically use env variableSecurity Note
Do not write your API key directly in production code. Use environment variables or a secure system that manages your configuration.